Excel Formula Does NOT Equal

There are two ways to “excel formula does not equal”: the quick way you copy and the durable way you understand. This page gives you both. The exact Excel answer is above; below, we build the small mental model that makes the fix stick, so the next variation of the same problem solves itself.

Exact answer

In Excel: the operator is <>, as in =IF(A2<>B2,"different","same"); inside COUNTIF and SUMIFS it becomes a text criterion, "<>West", or "<>"&E2 when comparing against a cell.

Annotated stepsExcel
1

In a plain formula, write the comparison directly: =A2<>B2 returns TRUE when they differ.

2

Wrap it in IF when you want words rather than TRUE and FALSE.

3

In a criteria argument, put the operator inside quotes: "<>0", "<>West".

4

Join a cell reference with &: "<>"&E2 — writing "<>E2" compares against the literal text E2.

5

For a case-sensitive test, use =NOT(EXACT(A2,B2)) instead of <>.

=IF(A2<>B2,"different","same")
Ctrl+CthenCtrl+Shift+V+Cthen+Ctrl+VPaste values · WindowsMac

Need it as an auditable file?

Ships inside the linked template — formula-driven, unlocked, audit-ready.

View template

What this does

Excel writes not-equal as the two angle brackets <>, not as != or =/=. In a formula it compares two values and returns TRUE or FALSE. In the criteria argument of COUNTIF, COUNTIFS, SUMIF, SUMIFS and AVERAGEIF the same operator has to be written inside a text string, and joined to a cell reference with & when the comparison value lives in a cell. The comparison ignores letter case, so EXACT is the tool when case matters. Most people learn this as a sequence of clicks and forget it by next week; learning it as a pattern instead is what lets you apply it to the next, slightly different version of the problem without starting from scratch. That is the difference this page is trying to make. The difference between a quick fix and a sheet you can trust is the extra minute you spend validating “excel formula does not equal”. Start on a copy or a tiny sample, keep the affected formula visible, and compare the result with the tool above before you touch the real workbook. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. The point is a calculation you can defend to a CFO or an auditor, but the practical win is that someone else can open the file and understand what happened without asking you.

A worked example

=COUNTIF(B2:B200,"<>West") counts every row whose region is not West. To compare against a cell instead, =COUNTIF(B2:B200,"<>"&E2). And =SUMIFS(C2:C200,B2:B200,"<>"&E2) totals the amounts for every region except the one named in E2. The operator itself is trivial; the criteria-string form is where it goes wrong, and a COUNTIF that quietly matches nothing returns a plausible zero rather than an error. One habit worth forming early: name the cells that hold your inputs, so the formula reads in plain language instead of a string of cell addresses. A reviewer — or you in three months — can then follow the logic without decoding what B7 and D2 were supposed to mean, which is most of what makes a sheet maintainable.

In Google Sheets

Google Sheets handles this almost identically to Excel. The formula syntax above is the same, and the menu lives under a slightly different label rather than a ribbon tab. Use the platform toggle at the top of the page to switch every keyboard shortcut between Windows and Mac, and expect at most cosmetic differences in naming. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top, the tool proves it, and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. Here is the takeaway for “excel formula does not equal”: copy the answer if you are busy, but if you have a spare few minutes, rebuild the example in Excel yourself with the tool above open beside it. That single pass — type it, run it, watch the result move when you change an input — is what turns a formula you found into a technique you trust. Keep your inputs labelled and referenced, never hard-coded, and the same sheet stays correct and auditable as it grows. Done that way, you will not need to look this up again, and you will be the person others ask.

Common mistakes

  • Typing != or =/=, neither of which Excel recognises.
  • Writing "<>E2" and quietly counting rows that differ from the two-character text E2.
  • Expecting <> to distinguish "west" from "West"; it does not, and EXACT is needed.
  • Comparing an empty cell with 0 — they test as equal, so a blank passes a "<>0" filter differently than expected.

Frequently asked questions

How do I write not equal to in Excel?

Use <>. For example =IF(A2<>"","filled","empty").

How do I count cells that are not blank?

=COUNTIF(A2:A200,"<>") counts every cell that contains something, and COUNTA does the same job more directly.

How do I use not-equal against a cell in COUNTIF?

Concatenate the operator and the reference: "<>"&E2.

Is it case sensitive?

No. Use =NOT(EXACT(A2,B2)) when case matters.

Other ways people ask this

On the way here you may have searched this as “does not equal in excel formula”, “excel formula for does not equal”, “excel formula array does not work with range” and “excel find does not work” — it is all the same task, and this page is the single, complete answer to it.

This guide also answers

  • excel formula not equal to

Why do people search for this in so many different ways?

Because the same task has many names. “does not equal in excel formula”, “excel formula for does not equal”, “excel formula array does not work with range” all point at the one operation explained on this page, which is why they all lead here.