Logical

NOT

Definition

NOT returns TRUE when its test is false, and FALSE when its test is true.

Syntax

=NOT(logical)

Arguments

Argument Meaning
logical A test that is either true or false, such as A2="shut".

Worked example

A marina marks a berth Open unless the status is shut. Status words are in A2:A4.

A: Status
open
shut
open

Formula: =IF(NOT(A2="shut"),"Open","Closed")

Result: Open. A2 is open, so A2="shut" is false, NOT flips that to true, and IF returns Open. Filled down, the formula gives Open, Closed, and Open.

Practice

Cell A2 holds 5. In B2, write a formula that returns 1 when A2 is not equal to 0, and 0 otherwise.

  1. In B2, write an IF formula that uses NOT and shows 1 when A2 is not 0, and 0 otherwise.
Step 1 of 2
Formulas here use English function names, such as SUM, and a period as the decimal separator, in every language.
Loading the sheet…

Related functions

NOT is usually placed inside IF so the cell can show one result when the flipped test is true and another result when it is false.

Common mistake

Writing =NOT(A2) when A2 holds text: NOT needs a true/false test, so the word open returns #VALUE! instead of flipping A2="shut".

Related functions

These links are related functions.