NOT Function – Invert TRUE / FALSE – Excel, VBA, & G 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 Excel NOT Function in Excel to change TRUE to FALSE or FALSE to TRUE.

NOT Main Function

What is the NOT Function?

NOT is one of Excel’s logical functions. It reverses the outcome of a logical test. In other words, it checks whether a condition has not been met.

How to Use the NOT Function

Use the Excel NOT Function like this:

=NOT(C3="Pop")

Excel will evaluate any logical expression you put in the parentheses, and the return the opposite result. See the example below:

How to use not

The formula checks whether the genre in column C contains “Pop”. Whatever the result of this test, NOT will reverse it.

So, for cells that contain “Pop” (logical test TRUE), NOT returns FALSE. For cells that don’t contain “Pop” (logical test FALSE), NOT flips this to TRUE.

Comparing Text

Note that text comparisons are not case-sensitive, so the NOT Function treats “POP” the same as “Pop”,

=NOT(C3="POP")

Case Sensitive

Also, NOT does not support wildcards. So this formula would return TRUE in all cases:

=NOT(C3="P*")

Find P

This is because NOT literally compares the text string in C3 with “P*”. Since it doesn’t find that (logical test FALSE), it will return TRUE.

Comparing Numbers

When comparing numbers, you can use the following comparison operators:

Comparison Operators

For example, if you had a list of 1980s movies and wanted to exclude ones from 1985 and earlier, you could use this formula:

=NOT(C3<=1985)

Compare Numbers

Keep in mind that with NOT, you’re effectively flipping the meaning of these operators. So the above formula is the same as:

=C3>1985

NOT EX 01

Note also, that if any of the expressions in NOT is, or evaluates to, a non-zero number, NOT will return FALSE:

=NOT(1985)

NOT EX 02

If the expression is, or evaluates to zero, NOT will return TRUE. So these formulas both returns true:

=NOT(1-1)
=NOT(0)

NOT EX 03

Using NOT with Other Logical Operators

You can combine NOT with any of Excel’s other logical operators, such as AND, OR, and XOR.

For example, say we want to find movies released on or after 1985 that were not directed by Steven Spielberg. We could use this formula:

=AND(C3>=1985,NOT(D3="Steven Spielberg"))

NOT with AND

When you combine logical operators like this, Excel evaluates them from the inside-out. So here it will first evaluate the NOT function, and then use its result in the AND.

Using NOT with IF

NOT is most often used within an IF statement. With an IF, instead of just returning TRUE or FALSE after a logical test, you can return whatever you want.

Use it like this:

=IF(AND(C3>=1985,NOT(D3="Steven Spielberg")),"Watch", "Don’t Watch")

IF NOT

This is the same formula from above, returning TRUE for movies released from 1985 not directed by Spielberg. But now, the IF returns “Watch” if the logical test returns TRUE, and “Don’t watch” if it returns FALSE.

NOT in Google Sheets

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

NOT Google Function

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