# NOT Function – Invert TRUE / FALSE – Excel, VBA, & G Sheets

Written by

Reviewed by

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.*

**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:

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")`

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

`=NOT(C3="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:

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)`

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`

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

`=NOT(1985)`

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

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

**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"))`

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")`

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: