Used within another function to provide the opposite of a logical expression.
Sample Usage
IF(NOT(Status1 = "Complete"), "Task Not Complete", "Task Complete")
Syntax
NOT(
-
logical_expression
-
logical_expression—An expression that evaluates to either true or false (boolean).
Examples
This example references the following sheet information:
Clothing Item | Transaction Total | In Stock? | Sold Date | |
---|---|---|---|---|
1 | T-Shirt | 1,170.00 | true | 02/12/19 |
2 | Pants | 1,491.00 | false | 02/15/19 |
3 | Jacket | 812.00 | true | 02/20/19 |
Given the table above, here are some examples of using NOT in a sheet:
Formula | Description | Result |
---|---|---|
=IF(NOT([In Stock?]1 = true), "Out Of Stock", "In Stock") | Returns the string “Out Of Stock” if the value in the “In Stock” column row 1 does NOT equal true. Returns the string “In Stock” otherwise. | In Stock |
=COUNTIF([Clothing Item]:[Clothing Item], NOT(@cell = "Jacket")) | Counts values that are not equal to the string “Jacket” in the “Clothing Item” column. Rows 1 and 2 apply. | 2 |
=IF(NOT(YEAR(TODAY())= YEAR([Sold Date]3)), "Sale did not occur this year", "Sale occurred this year") | Returns the string "Sale did not occur this year" if the year in row 3 of the "Sold Date" column is not equal to the current year. (In this example, the current year is 2019.) Returns the string "Sale occurred this year" otherwise. | Sale occurred this year |