Description
Use this function to reverse the logic of an argument. It returns TRUE if the argument is FALSE, and FALSE if the argument is TRUE. Supported in Chains.
Syntax
NOT(logical)
Inputs
This function accepts the following argument:
| Name | Required | Description | Valid input |
|---|---|---|---|
logical |
Yes | A value or expression that can be evaluated to TRUE or FALSE. | A cell reference, a logical value (TRUE or FALSE), a number (0 is FALSE, other numbers are TRUE), or a formula which results in any of these. |
Examples
Sample data
| A | B | |
|---|---|---|
| 1 | TRUE | 5 |
| 2 | FALSE | 0 |
| 3 | 10 | 20 |
| 4 | Apple | Banana |
Sample formulas
| Use case | Formula | Explanation and Result |
|---|---|---|
| Invert a logical value (TRUE to FALSE, or FALSE to TRUE). | =NOT(A1) |
This formula works in the following manner:
For this data set this formula returns FALSE. |
| Invert a logical value (TRUE to FALSE, or FALSE to TRUE). | =NOT(A2) |
This formula works in the following manner:
For this data set this formula returns TRUE. |
| Check if a value is NOT greater than a specific number. | =NOT(B1>10) |
This formula works in the following manner:
For this data set this formula returns TRUE. |
| Check if two values are NOT equal. | =NOT(A3=B3) |
This formula works in the following manner:
For this data set this formula returns TRUE. |
| Check if a cell does NOT contain numbers. | =NOT(ISNUMBER(A4)) |
This formula works in the following manner:
For this data set this formula returns TRUE. |
Notes
- This function is often used in combination with other logical functions, such as AND, OR, and IF.
- When used with non-boolean values, NOT converts its argument to a boolean before negating it.
-
NOT(0)returns TRUE, while NOT of any other number returns FALSE. -
NOT("FALSE")returns FALSE because the text "FALSE" is considered TRUE.
Tips
- Use NOT to invert complex conditions, making them easier to understand.
- Combine NOT with comparison operators to create "not equal to" conditions. For example:
NOT(A1=B1)is equivalent toA1<>B1. - When using NOT with other logical functions, be aware of De Morgan's laws for simplifying complex logical expressions.
- NOT can be used to check for non-blank cells; for example:
NOT(ISBLANK(A1)). - In conditional formatting, NOT can be useful for highlighting cells that don't meet certain criteria.