ISLOGICAL Function¶
The ISLOGICAL function in Excel is used to check whether a value is a logical (Boolean) value. It returns TRUE only when the value is TRUE or FALSE, and FALSE for everything else — numbers, text, dates, errors, and blank cells. This function is useful for validating that a cell genuinely holds a Boolean rather than a number or a piece of text that merely looks like one.
Key Features of ISLOGICAL:¶
- Returns
TRUEonly for the logical valuesTRUEandFALSE. - Returns
FALSEfor numbers, including1and0, even though those coerce toTRUE/FALSEin arithmetic contexts. - Returns
FALSEfor the text strings"TRUE"and"FALSE"— text that reads like a Boolean is not a Boolean. - Returns
FALSEfor blank cells, dates, times, and error values. - Commonly used to validate inputs before feeding them into logical functions such as
AND,OR, orNOT.
Syntax:¶
- value: The value or expression you want to test. Typically a cell reference or formula result.
How ISLOGICAL Works:¶
ISLOGICALevaluates the provided value or expression.- If the result is the logical
TRUEor the logicalFALSE, it returnsTRUE. - For every other data type — number, text, date, time, error, or blank — it returns
FALSE.
Note that no type coercion happens. ISLOGICAL asks what the value is, not what it could be converted to.
Examples:¶
1. A Logical Value:¶
If A1 contains TRUE:
Result:
2. A Number:¶
If A1 contains 1:
Result:
3. Text That Looks Logical:¶
If A1 contains the text "TRUE":
Result:
4. A Logical Literal:¶
Result:
5. The Result of a Comparison:¶
Result:
6. A Blank Cell:¶
If A1 is empty:
Result:
7. Validating an Input Before Using It:¶
Result:
8. Counting Logical Cells in a Range:¶
Result:
Notes:¶
ISLOGICALdistinguishes types, it does not convert them.ISLOGICAL(1)isFALSEeven thoughIF(1, ...)treats1asTRUE.- Comparison operators (
=,<>,>,<,>=,<=) always produce logical values, soISLOGICALapplied to a comparison is alwaysTRUE. ISLOGICALis part of the IS family of information functions (ISBLANK,ISERR,ISERROR,ISEVEN,ISLOGICAL,ISNA,ISNONTEXT,ISNUMBER,ISODD,ISTEXT, etc.).TYPEreturns4for exactly the values thatISLOGICALreturnsTRUEfor, soISLOGICAL(A1)andTYPE(A1)=4are equivalent.- When applied to a range,
ISLOGICALevaluates each cell individually and returns an array of results.
Applications:¶
- Input Validation: Confirm that a configuration flag really is a Boolean before branching on it.
- Data Cleaning: Find cells where a Boolean was entered as the text
"TRUE"or as1/0and needs normalising. - Type Auditing: Combine with
ISNUMBERandISTEXTto classify every cell in a mixed-type column. - Conditional Formatting: Highlight cells whose type does not match the expected schema.
- Defensive Formulas: Guard logical functions against arguments of the wrong type.
Related Functions:¶
- TYPE: Returns a numeric code indicating the data type of a value —
4for logical values. - ISBLANK: Returns TRUE if the cell is empty.
- ISERROR: Returns TRUE if the value is any error.
- ISNA: Returns TRUE only if the value is the
#N/Aerror. - ISNUMBER: Returns TRUE if the value is a number.
- ISTEXT: Returns TRUE if the value is text.
- N: Converts a value to a number — logical
TRUEbecomes1andFALSEbecomes0.
Tip: Spreadsheets often accumulate a mix of real Booleans, the numbers
1/0, and the text"TRUE"/"FALSE"in the same column, because each of the three looks identical once formatted.ISLOGICALis the quickest way to find the odd ones out before they cause a subtle logic bug downstream.