Logical

Flipping a true or false test

Definition

Showing 1 when a test is not true means wrapping NOT inside IF.

Syntax

=IF(NOT(logical),1,0)

Arguments

Argument Meaning
logical The test to flip, for example B2>10.

Worked example

A meter sheet flags a reading in B2 when it is not above 10.

A: Meter B: Reading
M-1 4
M-2 18
M-3 10

Formula: =IF(NOT(B2>10),1,0)

Result: 1. 4 is not greater than 10, so NOT flips the failed test and IF shows 1.

Practice

Cell A2 holds 0. In B2, write a formula that shows 1 when A2 is not equal to 0 and 0 when it is 0.

  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 the function that flips the test.

Common mistake

Leaving IF out, as in =NOT(B2>10): the cell then shows TRUE or FALSE instead of 1 or 0.

Related functions

These links are related functions.