ID EN
#Information

ISLOGICAL

Excel Functions

Test if a value is logical

Syntax

EXCEL
=ISLOGICAL(value)

Arguments

Parameter Description
value The value to test as logical.

Return Value

A logical value (TRUE or FALSE)

Details

The ISLOGICAL function returns TRUE when a cell contains the logical values TRUE or FALSE, and returns FALSE for cells that contain any other value, including empty cells. The ISLOGICAL function takes one argument, value, which can be a cell reference, a formula, or a hardcoded value. When value is TRUE or FALSE, the ISLOGICAL function will return TRUE. If value is any other value, ISLOGICAL will return FALSE. The ISLOGICAL function returns TRUE if value is TRUE or FALSE: If value is a formula, ISLOGICAL checks the result of the formula: Note that 1 and 0 (zero) are not evaluated as TRUE and FALSE.

Examples

Examples

The ISLOGICAL function returns TRUE if value is TRUE or FALSE:

EXCEL
=ISLOGICAL(TRUE) // returns TRUE
=ISLOGICAL(FALSE) // returns TRUE
Examples

If value is a formula, ISLOGICAL checks the result of the formula:

EXCEL
=ISLOGICAL(100>50) // returns TRUE
=ISLOGICAL(2+2) // returns FALSE
=ISLOGICAL(A1=B1) // returns TRUE
Examples

Note that 1 and 0 (zero) are not evaluated as TRUE and FALSE.

EXCEL
=ISLOGICAL(1) // returns FALSE
=ISLOGICAL(0) // returns FALSE
Count logicals

To count cells in a range that contain logicals, you can use the SUMPRODUCT function like this:

EXCEL
=SUMPRODUCT(--ISLOGICAL(range))

See Also

ISBLANK ISERR ISERROR ISEVEN ISFORMULA ISNA ISNONTEXT ISNUMBER