ID EN
#Logical

NOT

Excel Functions

Reverse arguments or results

Syntax

EXCEL
=NOT(logical)

Arguments

Parameter Description
logical A value or logical expression that can be evaluated as TRUE or FALSE.

Return Value

A reversed logical value

Details

The NOT function returns the opposite of a given logical or Boolean value. Use the NOT function to reverse a Boolean value or the result of a logical expression. When givenFALSE, NOT returns TRUE. When given TRUE, NOT returns FALSE. The NOT function is commonly used with other functions like IF, AND, and OR to create complex logical tests. The purpose of the NOT function is to reverse a Boolean value, for example: NOT is often used to reverse the result from another function. For example, if cell A1 contains "purple", the formula below will return FALSE since A1 is neither "green" nor "red": If we want to reverse this logic, we can wrap the OR function inside the NOT function: The OR function returns FALSE (as before), and the NOT function returns TRUE.

Examples

NOT function basics

The purpose of the NOT function is to reverse a Boolean value, for example:

EXCEL
=NOT(TRUE) // returns FALSE
=NOT(FALSE) // returns TRUE
NOT function basics

NOT is often used to reverse the result from another function. For example, if cell A1 contains "purple", the formula below will return FALSE since A1

EXCEL
=OR(A1="green",A1="red") // returns FALSE
NOT function basics

If we want to reverse this logic, we can wrap the OR function inside the NOT function:

EXCEL
=NOT(OR(A1="green",A1="red")) // returns TRUE
Example - NOT this OR that

In the worksheet below, the goal is to test each color in column B and return TRUE if the color is not "green" or "red". The formula in C5, copied dow

EXCEL
=NOT(OR(B5="green",B5="red"))
Example - IF + NOT

The NOT function is often used inside the IF function as a logical test. For example, in the worksheet below, the goal is to "flag" colors that are no

EXCEL
=IF(NOT(OR(B5="red",B5="green")),"x","")
Example - Not blank

A common use case for the NOT function is to reverse the behavior of another function. For example, If cell A1 is blank (empty), the ISBLANK function

EXCEL
=ISBLANK(A1)  // TRUE if A1 is empty

See Also

AND OR