ISLOGICAL Function Examples – Excel, VBA, & Google Sheets

Written by

Editorial Team

Reviewed by

Steve Rynearson

Last updated on November 6, 2023
Download Example Workbook

Download the example workbook

This tutorial demonstrates how to use the ISLOGICAL Function in Excel to test if a cell is a logical value.

ISLOGICAL Main

How to use the ISLOGICAL Function

The ISLOGICAL Function tests if a cell contains a logical expression (TRUE or FALSE). If the cell contains a logical expression, it returns TRUE, otherwise it returns FALSE.

=ISLOGICAL(A2)

ISLOGICAL

If Is Logical

Usually, after performing a logical test, you will want to do something based on the result of that test. The IF Function can be used to perform different actions if a statement is evaluated as TRUE or FALSE. Let’s use it with the ISLOGICAL Function.

=IF(ISLOGICAL(A2),"logical","not logical")

IF ISLOGICAL

If Is Not Logical

The NOT Function inverts logical results. It changes TRUE to FALSE and FALSE to TRUE. Here we can use that with the IF Function:

=IF(NOT(ISLOGICAL(A2)),"not logical", "logical")

IF NOT ISLOGICAL

Other Logical Functions

Excel / Google Sheets contain many other logical functions to perform other logical tests. Here is a list:

IF / IS Functions
iferror
iserror
isna
iserr
isblank
isnumber
istext
isnontext
isformula
islogical
isref
iseven
isodd

ISLOGICAL in Google Sheets

The ISLOGICAL Function works exactly the same in Google Sheets as in Excel:

ISLOGICAL Google

ISLOGICAL Examples in VBA

You can also use the ISLOGICAL function in VBA. Type:

application.worksheetfunction.islogical(value)

For the function arguments (value, etc.), you can either enter them directly into the function, or define variables to use instead.

AI Formula Generator

Try for Free

Excel Practice Worksheet

practice excel worksheet

Practice Excel functions and formulas with our 100% free practice worksheets!

  • Automatically Graded Exercises
  • Learn Excel, Inside Excel!

Free Download

Return to List of Excel Functions