NOT Function

Excel Functions › Logical

All Excel versions

The Excel NOT function flips a logical value: TRUE becomes FALSE and FALSE becomes TRUE. That one-argument simplicity makes it the cleanest way to express “everything except” conditions — cells that are not blank, values that are not in range, rows that do not match. It works in every version of Excel and pairs naturally with IF, AND, and OR.


Quick answer: to flag rows where a cell is not empty:
=NOT(ISBLANK(A2))
NOT takes exactly one logical test and returns its opposite. =NOT(TRUE) is FALSE; =NOT(B2>=70) is TRUE only when B2 is below 70.

Syntax

=NOT(logical)
ArgumentDescription
logicalRequiredAny value or expression that evaluates to TRUE or FALSE — a comparison like B2>=70, another logical function, or a cell holding a boolean. Numbers work too: 0 is treated as FALSE, every other number as TRUE.

Available in: every version of Excel, on every platform. NOT is one of the original logical functions and behaves identically everywhere.

Invert a simple test

Scores sit in B2:B5 and the passing mark is 70. Instead of writing a “failed” test from scratch, invert the pass test:

ABC
1StudentScoreNeeds retake?
2Ava88FALSE
3Ben64TRUE
4Cara70FALSE
5Dev59TRUE
=NOT(B2>=70) // TRUE when the student did NOT pass

Of course =B2<70 gives the same answer here — for a single comparison the operator is shorter. NOT earns its keep when the thing you are inverting is not a simple comparison: a whole AND/OR expression, an ISBLANK check, or a value another formula already produced.

=IF(NOT(B2>=70), "Needs retake", "Cleared") // wrap it in IF for a label

Try it: interactive NOT demo

Live demo

Change the score and watch the test — and its NOT-inverted twin — flip in real time.

NOT with AND, OR and ISBLANK

NOT’s best work happens around other logical functions. The classic: flag cells that are not blank.

=NOT(ISBLANK(A2)) // TRUE when A2 contains anything

Invert a compound condition without rewriting every piece of it:

=NOT(AND(B2>=60, B2<=80)) // TRUE when B2 is OUTSIDE 60-80
=IF(NOT(OR(C2="Paid", C2="Waived")), "Chase payment", "OK")

De Morgan’s law is worth knowing: NOT(AND(x, y)) equals OR(NOT(x), NOT(y)). When a formula reads awkwardly one way, the other form often says the same thing more plainly.

Counting with NOT: booleans coerce to 1/0 in math, so =SUMPRODUCT(--NOT(ISBLANK(A2:A100))) counts non-blank cells. The double minus -- converts TRUE/FALSE into 1/0 — see the TRUE and FALSE pages for the full story.

Errors & common pitfalls

#VALUE! — the argument isn’t logical. Text that isn’t “TRUE” or “FALSE” makes NOT choke: =NOT("yes") returns #VALUE!. Test the text instead: =NOT(A2="yes").

Pitfall: NOT takes exactly one argument. =NOT(A2>5, B2>5) is a syntax error. To negate several tests at once, wrap them first: =NOT(AND(A2>5, B2>5)).

Pitfall: NOT(range) spills in Excel 365. =NOT(A2:A10="x") returns ten results in Microsoft 365 but behaves differently in legacy Excel, where it silently grabs only the value on the formula’s own row. For one-cell answers, point NOT at one cell.

Pitfall: double negatives read badly. =IF(NOT(A2<>""), …) works, but =IF(A2="", …) says the same thing. If a NOT makes a formula harder to read aloud, flip the comparison operator instead.

Practice workbook

📊
Download the free NOT practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

What does the NOT function do in Excel?
It reverses a logical value: =NOT(TRUE) returns FALSE and =NOT(FALSE) returns TRUE. Point it at any test — =NOT(B2>=70) is TRUE only when B2 is below 70.
Is NOT(A2=B2) the same as A2<>B2?
Yes — for a single comparison the <> operator is shorter and clearer. NOT becomes the better tool when you’re inverting something bigger: a whole AND/OR expression or a function like ISBLANK.
How do I test that a cell is NOT blank?
=NOT(ISBLANK(A2)) returns TRUE when A2 contains anything. The operator version =A2<>"" is nearly equivalent, but note it also treats a formula returning "" as blank, while ISBLANK does not.
Can NOT take more than one argument?
No — exactly one. To negate several conditions, combine them first with AND or OR: =NOT(AND(A2>5, B2>5)) is TRUE unless both tests pass.
Why does NOT return #VALUE!?
Its argument couldn’t be read as TRUE/FALSE — usually text like =NOT("yes"). Turn the text into a test: =NOT(A2="yes"). Numbers are fine: 0 counts as FALSE, everything else as TRUE.

Master functions like this in one day

This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related functions: AND · OR · XOR · IF · IFS · IFERROR