What is the ISLOGICAL function?
=ISLOGICAL(value)ISLOGICAL returns TRUE if a value is a logical value (TRUE or FALSE). It is most often used inside IF to treat values differently by kind.
Column A of the sheet mixes text, numbers, a blank, a logical value, errors and text that looks like a number; column B says what each is. Column C shows the same formula copied down.
ISLOGICAL confirms that a column linked to check boxes, or a "done" column collected from other sheets, really holds TRUE/FALSE. The text "TRUE" or the number 1 can look the same but are not logical values, and COUNTIF(range, TRUE) may not count them.
Arguments
- value
- The value or cell to test.
ISLOGICAL examples
Example 1. Check for a logical value
=ISLOGICAL(A5)TRUE, so TRUE.
Example 2. The text "TRUE"
=ISLOGICAL("TRUE")Text in quotes, so FALSE.
Example 3. Result for each kind of value
=ISLOGICAL(A2)Only the cell with the logical value TRUE is TRUE.
Value in column A =ISLOGICAL(A2) Apple FALSE 120 FALSE (blank) FALSE TRUE TRUE #N/A FALSE #DIV/0! FALSE "120" (text) FALSE
Common mistakes
Text that looks like a number
According to Microsoft, IS functions test the value without converting it, so "120" stored as text is text, not a number.
The number 1
1 acts like TRUE in calculations but is not a logical value, so FALSE.
Blank cells
A blank cell is not a logical value, so the result is FALSE. The linked cell of an unchecked box holds FALSE, so it is TRUE.
FAQ
- What about comparisons?
- =ISLOGICAL(A3>100) is TRUE because a comparison returns a logical value.
- Where is it used?
- To check that an input came in as TRUE/FALSE.
- How do I turn the text "TRUE" into a logical value?
- Compare it: =A2="TRUE" returns a real TRUE or FALSE.