NOT Function

Changes FALSE to TRUE, or TRUE to FALSE

Functions  >  Logical  >  NOT

Overview

The Excel NOT function changes a logical or Boolean result from FALSE to TRUE or TRUE to FALSE.  When the NOT function is passed an expression that evaluates as TRUE, it will return FALSE.  When the NOT function is passed an expression that evaluates as FALSE, it will return TRUE.

Syntax

=NOT(logical)

Arguments

logical – A value or expression that can be evaluated to TRUE or FALSE.

Version

Excel 2003

Purpose

The Excel NOT function returns TRUE when given a FALSE value, and FALSE when given a TRUE value.  The NOT function only works when the expression it is evaluating is either TRUE or FALSE.

=NOT(logical)

Examples

In this first example, we can see how the NOT function essentially changes all TRUE values to FALSE and all FALSE values to TRUE:

NOT Data Set 1

The formula we have in cell D4 (and is applied to the adjacent cells in column D) is:

=NOT(B4)

In the example above, we can see that every value in column D shows the opposite of what is shown in column B.  Where cell B4 is ‘FALSE’, cell D4 is ‘TRUE’, and so on for the adjacent cells.

A common use for the NOT function is the reverse the result of another function.  Let’s see what that looks like below:

NOT Data Set 2

The formula we have in cell D4 (and is applied to the adjacent cells in column D) is:

=NOT(ISNUMBER(B4))

The ISNUMBER function returns the value ‘TRUE’ when a value is number.  In the example above, we use the NOT function to reverse the logic, which is why the result in cell D4 is ‘FALSE’.  We can go a step further to clean up our data, which involves using an IF statement as well: 

NOT Data Set 3

The formula we have in cell D4 (and is applied to the adjacent cells in column D) is:

=IF(NOT(ISNUMBER(B4)), “NO”, “”)

By reversing the result of the ISNUMBER function, we are able to use an IF statement to single out the values that are not numbers.  The NOT function can be used in a wide variety of situations, where logic needs to be reversed.  This is common with functions such as: ISTEXT, ISNUMBER, ISBLANK and ISFORMULA.  The NOT function is also typically paired with the IF function as we saw above, which allows the user to have more control over the output.

Notes

  • The input to the NOT function must be a logical value, otherwise a #VALUE! error will occur

Author

Kyle Stott

Kyle Stott

Microsoft Excel Expert

Kyle has worked professionally with Microsoft Excel for almost a decade and has been consulting on and teaching best practices in Microsoft Excel for several years to over 400 companies across 30+ countries.

Want to learn more?

Join My Excel Academy Today!

This All-Access Pass Includes:

30-Day Money-Back Guarantee

Want to learn more?

Join My Excel Academy Today!

All-Access Pass Includes:

30-Day Money-Back Guarantee

Want to learn more?

Join My Excel Academy Today!

30-Day Money-Back Guarantee

This all-access pass includes:

Don’t hesitate – join now!

Have any questions?

View our Frequently Asked Questions or contact us!