Google Sheets function · Logical
NOT in Google Sheets: syntax and examples
NOT returns the opposite of a logical value or test. It is mostly used inside IF, FILTER and conditional formatting to express a condition that must not hold.
Syntax
NOT(logical_expression)
Arguments
| Argument | Type | Required | What it does |
|---|---|---|---|
logical_expression | boolean | yes | A logical value or a test. Any non-zero number counts as TRUE, 0 as FALSE. |
Examples
The examples use this table, starting in A1:
| Order | Qty | Paid |
| O-1 | 12 | True |
| O-2 | 3 | False |
| O-3 | 0 | True |
=NOT(C3)Result: TRUE
The order is unpaid, so the flag FALSE flips to TRUE.
Run in a Google Sheet (English US locale) on .
=NOT(B2 > 10)Result: FALSE
Negates a comparison: 12 is above 10, so NOT gives FALSE.
Run in a Google Sheet (English US locale) on .
=NOT(B4)Result: TRUE
A number is read as a logical value: 0 is FALSE, so NOT returns TRUE.
Run in a Google Sheet (English US locale) on .
=IF(NOT(C3), "ask for payment", "ok")Result: ask for payment
Used as an IF condition to act on the unpaid case.
Run in a Google Sheet (English US locale) on .
=ARRAYFORMULA(NOT(C2:C4))Result:
| FALSE |
| TRUE |
| FALSE |
ARRAYFORMULA flips every flag in the column and returns one result per row.
Run in a Google Sheet (English US locale) on .
Common errors
- Numbers count as logical values: 0 is FALSE and every other number is TRUE. NOT(5) is FALSE, which surprises people who expect a number back.
- Text that is not TRUE or FALSE returns #VALUE!. Compare text with = first, for example NOT(A1 = "paid").
Compared with Excel
Same syntax in Excel.