Use the NOT function, one of the logical functions, when you want to make sure one value is not equal to another.

Example

Examples of the NOT function to reverse arguments.  E.G. =NOT(1+1=2)

The NOT function reverses the value of its argument.

One common use for the NOT function is to expand the usefulness of other functions that perform logical tests. For example, the IF function performs a logical test and then returns one value if the test evaluates to TRUE and another value if the test evaluates to FALSE. By using the NOT function as the logical_test argument of the IF function, you can test many different conditions instead of just one.

Syntax

NOT(logical)

The NOT function syntax has the following arguments:

  • Logical    Required. A value or expression that can be evaluated to TRUE or FALSE.

Remarks

If logical is FALSE, NOT returns TRUE; if logical is TRUE, NOT returns FALSE.

Examples

Here are some general examples of using NOT by itself, and in conjunction with IF, AND and OR.

Examples of NOT with IF, AND and OR functions

Formula

Description

=NOT(A2>100)

A2 is NOT greater than 100

=IF(AND(NOT(A2>1),NOT(A2<100)),A2,"The value is out of range")

50 is greater than 1 (TRUE), AND 50 is less than 100 (TRUE), so NOT reverses both arguments to FALSE. AND requires both arguments to be TRUE, so it returns the result if FALSE.

=IF(OR(NOT(A3<0),NOT(A3>50)),A3,"The value is out of range")

100 is not less than 0 (FALSE), and 100 is greater than 50 (TRUE), so NOT reverses the arguments to TRUE/FALSE. OR only requires one argument to be TRUE, so it returns the result if TRUE.

Sales Commission Calculation

Here is a fairly common scenario where we need to calculate if sales people qualify for a bonus using NOT with IF and AND.

Example of calculating a sales bonus with IF, AND, and NOT.  Formula in cell E14 is =IF(AND(NOT(B14<$B$7),NOT(C14<$B$5)),B14*$B$8,0)
  • =IF(AND(NOT(B14<$B$7),NOT(C14<$B$5)),B14*$B$8,0)- IF Total Sales is NOT less than Sales Goal, AND Accounts are NOT less than the Account Goal, then multiply Total Sales by the Commission %, otherwise return 0.

Need more help?

You can always ask an expert in the Excel Tech Community or get support in Communities.

Related Topics

Video: Advanced IF functions Learn how to use nested functions in a formula IF function AND function OR function Overview of formulas in Excel How to avoid broken formulas Use error checking to detect errors in formulas Keyboard shortcuts in Excel Logical functions (reference) Excel functions (alphabetical) Excel functions (by category)

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.