Reverse arguments or results
=NOT(logical)
| Parameter | Description |
|---|---|
logical |
A value or logical expression that can be evaluated as TRUE or FALSE. |
The purpose of the NOT function is to reverse a Boolean value, for example:
=NOT(TRUE) // returns FALSE
=NOT(FALSE) // returns TRUE
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
=OR(A1="green",A1="red") // returns FALSE
If we want to reverse this logic, we can wrap the OR function inside the NOT function:
=NOT(OR(A1="green",A1="red")) // returns TRUE
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
=NOT(OR(B5="green",B5="red"))
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
=IF(NOT(OR(B5="red",B5="green")),"x","")
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
=ISBLANK(A1) // TRUE if A1 is empty