Arte SheetsLearn. Try. Understand.

Information

ISLOGICAL function: verify real TRUE/FALSE values vs text "TRUE" or 1/0

Check whether imported flag columns hold genuine logical booleans (TRUE/FALSE) rather than strings or numbers using ISLOGICAL.

Why text "TRUE" and numeric 1 are NOT logical values

CSV and JSON-to-CSV tools sometimes quote boolean flags as text strings ("TRUE") or export integers (1 and 0). In spreadsheet formulas, text "TRUE" is greater than every number and does not equal boolean TRUE.

ISLOGICAL(value) returns TRUE strictly when value is boolean TRUE or boolean FALSE—returning FALSE for numbers (1, 0), text ("TRUE"), blanks, and errors.

RowType (A)FlagValue (B)ISLOGICAL(B)
Real BooleanTRUETRUE
False BooleanFALSETRUE
Quoted Text="TRUE"FALSE
Numeric One1FALSE

Audit mixed boolean imports

ISLOGICAL(B2) and ISLOGICAL(B3) both return TRUE (even when the boolean is FALSE!), whereas ISLOGICAL(B4) returns FALSE on text "TRUE".

=ISLOGICAL(B2)

Normalize booleans and text TRUE/FALSE

IF(ISLOGICAL(B4), B4, UPPER(TRIM(B4))="TRUE") converts text "TRUE" into a genuine boolean.

This pattern does not treat numeric 1 as TRUE; other text also becomes FALSE. Define and validate the accepted input set before normalizing a production flag column.

=ISLOGICAL(IF(ISLOGICAL(B4), B4, UPPER(TRIM(B4))="TRUE"))

Try the example

Use the original values or change them to test your understanding.

Further reading