Skip to content

Lesson 89 of 92 · Free Excel Course

Excel · Excel function reference

Excel NOT Function: Syntax, Examples and Common Errors

How the Excel NOT function flips TRUE and FALSE, with NOT(ISBLANK), NOT with AND and OR, IF, FILTER and conditional formatting examples. Free workbook.

The Excel NOT function flips a logical value: give it TRUE and it returns FALSE, give it FALSE and it returns TRUE. On its own that sounds pointless, but it's handy whenever the test you can write easily is the opposite of the one you need: "is this cell blank?" becomes "is this cell filled in?", and "is it Hold or Cancelled?" becomes "is it neither?". NOT always returns TRUE or FALSE (or an error). It works in Excel for Microsoft 365 (Windows and Mac), Excel for the web, Excel 2024, 2021, 2019 and 2016.

Syntax

=NOT(logical)
  • logical (required): a value or expression that Excel can evaluate to TRUE or FALSE. Usually a comparison such as A2>100, a function that returns TRUE/FALSE such as ISBLANK(C2) or OR(...), or a cell that holds TRUE or FALSE.

That's the only argument. NOT takes exactly one, so =NOT(A2>1,A2<100) is refused with a "too many arguments" message. If you have several conditions, combine them with AND or OR first and put that inside NOT.

Numbers are allowed too: Excel reads 0 as FALSE and every other number as TRUE.

Examples

1. Microsoft's example. Microsoft's NOT page uses 50 in A2 and 100 in A3. =NOT(A2>100) asks "is A2 not greater than 100?" 50 isn't, so the answer is TRUE.

C2=NOT(A2>100)
ABC
1DataFormulaResult
250=NOT(A2>100)TRUE
3100=IF(AND(NOT(A2>1),NOT(A2<100)),A2,"The value is out of range")The value is out of range
4=IF(OR(NOT(A3<0),NOT(A3>50)),A3,"The value is out of range")100
Column B shows each formula as text; column C is what Excel returns. 50 is greater than 1 and less than 100, so both NOTs give FALSE and AND fails. For 100, NOT(A3<0) is TRUE, which is enough for OR.

The second formula trips people up. A2>1 is TRUE, so NOT(A2>1) is FALSE, and AND needs everything TRUE, so you get the message even though 50 is "in range". Reading NOT out loud ("A2 is not more than 1 and A2 is not less than 100") helps you catch that.

2. Not blank, inside IF. You want to chase every contract that hasn't been signed yet. ISBLANK tells you when a cell is empty; NOT turns it into "has a date".

D6=IF(NOT(ISBLANK(C6)),"Signed","Chase")
ABCD
5OrderStatusSigned onContract
61001Paid11/2/2026Signed
71002HoldChase
81003Cancelled11/9/2026Signed
91004OpenChase
101005Paid11/15/2026Signed
Copied down, the formula says Chase for the two orders with no signed date.

You could also flip the IF around (=IF(ISBLANK(C6),"Chase","Signed")), which is just as correct. NOT earns its place when the "not blank" test has to sit inside AND, a conditional formatting rule or FILTER.

3. NOT with OR (and AND). To find orders that are neither on Hold nor Cancelled, test for either one and reverse the lot:

C6=NOT(OR(B6="Hold",B6="Cancelled"))
ABCD
5OrderStatusNOT(OR(...))AND with <>
61001PaidTRUETRUE
71002HoldFALSEFALSE
81003CancelledFALSEFALSE
91004OpenTRUETRUE
101005PaidTRUETRUE
Column D uses =AND(B6<>"Hold",B6<>"Cancelled") and agrees on every row.

That agreement is a handy rule (logicians call it De Morgan's law): "not (A or B)" means "not A and not B", and "not (A and B)" means "not A or not B". When you move NOT inside the brackets, OR becomes AND and AND becomes OR. Forgetting to swap them is the classic way these formulas go wrong.

4. Numbers, blanks and text. NOT follows Excel's rule that zero is FALSE:

B14=NOT(A14)
AB
13Value=NOT(value)
140TRUE
157FALSE
16-2FALSE
17yes#VALUE!
18TRUE
Any non-zero number counts as TRUE, so NOT returns FALSE. The empty cell A18 counts as 0, so it returns TRUE too. Ordinary text can't be read as TRUE or FALSE.

5. In FILTER and conditional formatting. In Excel for Microsoft 365, Excel 2021 or later and Excel for the web, =FILTER(A6:B10,NOT(B6:B10="Paid")) lists the three unpaid orders (1002, 1003 and 1004). NOT works on each row of the range in turn. For a highlight, select A6:C10, choose Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format, type =NOT($B6="Paid"), click Format, pick a colour on the Fill tab and click OK twice. The dollar sign keeps every column looking at the Status column. Both also work with <>; NOT matters more when the test is something like NOT(ISNUMBER(...)). Conditional formatting and Sort and filter cover these tools in full.

Common errors

  • #VALUE!: the argument is text that isn't a logical value, such as =NOT(A2) when A2 says "yes". Compare the text instead: =NOT(A2="yes").
  • An error passes straight through. If the test inside NOT gives #N/A or #DIV/0!, NOT returns that same error. Fix the inner formula first.
  • "Too many arguments": you gave NOT two conditions. Wrap them in AND or OR: =NOT(AND(A2>1,A2<100)).
  • The opposite of what you expected: usually AND and OR weren't swapped when the NOT moved (see example 3), or NOT reverses a test that was already "not", such as NOT(B2<>"Paid"), which is just B2="Paid". Two negatives cancel out.
  • A "blank" cell counted as filled in: NOT(ISBLANK(C2)) is TRUE when C2 holds a formula returning "" or a stray space. Use C2<>"" if formula blanks should count as empty.
  • TRUE/FALSE when you wanted words: NOT only returns TRUE or FALSE. Put it inside IF to show "Signed", "Chase" or a number.

Related functions

Try it yourself

Download the practice workbook. It has Microsoft's example, an order list to test with NOT, OR, ISBLANK and FILTER, and a numbers-and-text check. Yellow cells are where your formulas go, and the Answers sheet has every formula working, plus a real conditional formatting rule that shades the unpaid orders.

Frequently asked questions

What does NOT do in Excel?

NOT reverses a logical value. =NOT(TRUE) returns FALSE and =NOT(FALSE) returns TRUE. You normally put a test inside it, so =NOT(B2="Paid") is TRUE for every row that is not Paid.

Should I use NOT or <> for "not equal to"?

For a single comparison, <> is shorter and easier to read: =B2<>"Paid" gives exactly the same answer as =NOT(B2="Paid"). Use NOT when you want to reverse something that has no opposite operator, such as ISBLANK, ISNUMBER, AND or OR.

How do I check that a cell is not blank in Excel?

Use =NOT(ISBLANK(A2)). It returns TRUE when A2 contains anything. Inside IF: =IF(NOT(ISBLANK(C2)),"Signed","Chase"). Note that ISBLANK treats a cell holding a formula that returns "" as not blank. The ISBLANK + logic checks lesson covers that case.

Can NOT take more than one condition?

No. NOT has exactly one argument. To reverse several conditions, wrap them in AND or OR first: =NOT(OR(B2="Hold",B2="Cancelled")) is TRUE only when the status is neither Hold nor Cancelled.

What does NOT do with a number?

Excel treats 0 as FALSE and any other number as TRUE, so =NOT(0) returns TRUE and =NOT(7) or =NOT(-2) returns FALSE. Text that isn't TRUE or FALSE gives #VALUE!.