NOT function
The NOT function in Excel is a logical function that reverses the logical value of its argument. If the argument is TRUE, NOT will return FALSE, and if the argument is FALSE, NOT will return TRUE.
Syntax:
=NOT(logical)
- logical: This is the value or expression you want to evaluate. It can be a cell reference, a logical expression, or a logical value (
TRUEorFALSE).
Example 1:
If cell A1 contains the value TRUE, the formula:
=NOT(A1)
will return FALSE.
Example 2:
If cell B1 contains the value FALSE, the formula:
=NOT(B1)
will return TRUE.
Example 3:
You can also use NOT with logical expressions. For instance, to check if a value in cell C1 is not equal to 10, you can use:
=NOT(C1=10)
- If
C1is not equal to 10, this formula returnsTRUE. - If
C1is equal to 10, it returnsFALSE.
Use cases:
- In conditional formulas: The
NOTfunction can be used to reverse logical tests. For example, to highlight cells that do not contain a specific value. - In conjunction with
IFstatements: You can useNOTto invert conditions in logical functions, making it flexible for more complex logical operations.