ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Conditional math
  3. SUMIFS Not Equal To: Exclude Values From a Total

SUMIFS Not Equal To: Exclude Values From a Total

By ExcelReady Team·Updated November 2, 2026·6 min read

The short answer

In SUMIFS, not equal to is written "<>" followed by the value, inside double quotes. =SUMIFS(D2:D8,C2:C8,"<>Cancelled") adds every amount except cancelled orders. To exclude two values, repeat the range with a second "<>" condition. To use a cell, join it with &, as in "<>"&G2.

Key takeaways

  • Not equal to in Excel is <>, inside quotes with the value: "<>Cancelled". The != sign does not work.
  • To exclude two values, add two conditions on the same range: C2:C8,"<>Cancelled",C2:C8,"<>Refunded".
  • Never add two "not equal" SUMIFS together. Every row that is neither value gets counted twice.
  • To exclude the value in a cell, write "<>"&G2, not "<>G2".
  • "<>" on its own means not blank, so it adds only rows where the criteria cell has something in it.
On this page+
  1. How to write a SUMIFS not equal to formula
  2. How to combine not equal with other conditions
  3. How to exclude two or more values with SUMIFS
  4. How to use not equal to a cell value
  5. Not equal to a number, zero or blank
  6. Not equal to in COUNTIFS and AVERAGEIFS
  7. Check your result with total minus excluded
  8. Practise it

To use SUMIFS with not equal to, write the criteria as "<>value": =SUMIFS(D2:D8,C2:C8,"<>Cancelled") adds every order except the cancelled ones. You can exclude several values by repeating the range, mix "not equal" with normal conditions, and point the criteria at a cell. This guide shows each case on one order table, plus the mistake that makes totals too big.

All the examples use this table in A1:D8. The amounts add up to 5,400 in total.

ABCD
1OrderRegionStatusAmount
21001NorthPaid1200
31002SouthCancelled800
41003NorthRefunded450
51004EastPaid950
61005NorthPaid600
71006SouthPaid1100
81007EastCancelled300

How to write a SUMIFS not equal to formula#

SUMIFS adds the numbers in the first range where every condition is met. The syntax is:

Excel formula
=SUMIFS(sum_range, criteria_range1, criteria1, ...)

For "not equal to", the criteria is <> followed by the value, all inside double quotes:

Excel formula
=SUMIFS(D2:D8,C2:C8,"<>Cancelled")

The result is 4,300: the full 5,400 minus the two cancelled orders (800 and 300). The SUMIFS function guide has the full syntax, and SUMIF vs SUMIFS explains why the sum range comes first here but last in SUMIF.

A few rules for the criteria:

  • <> is Excel's not-equal sign. != from programming gives no match, so the formula adds everything.
  • The operator and the value go together in one pair of quotes: "<>Cancelled", not "<>" "Cancelled".
  • It is not case-sensitive: "<>cancelled" gives the same 4,300.

How to combine not equal with other conditions#

You can mix a "not equal" condition with normal ones. Every condition must be true for a row to be added. To total North orders that were not refunded:

Excel formula
=SUMIFS(D2:D8,B2:B8,"North",C2:C8,"<>Refunded")

North has three orders: 1,200 (Paid), 450 (Refunded) and 600 (Paid). The refund is left out, so the result is 1,800. This is the exercise on this page. The guide to COUNTIFS and SUMIFS with multiple conditions shows more combinations.

How to exclude two or more values with SUMIFS#

Repeat the same criteria range once for each value you want to leave out:

Excel formula
=SUMIFS(D2:D8,C2:C8,"<>Cancelled",C2:C8,"<>Refunded")

A row is added only if its status is not Cancelled and not Refunded. That leaves the four Paid orders: 1,200 + 950 + 600 + 1,100 = 3,850.

This is where SUMIFS beats SUMIF. SUMIF takes one condition, so excluding two values with it needs a subtraction trick. The SUMIF not equal guide shows that approach for older files.

The double-counting mistake#

It looks logical to add two "not equal" totals together. Don't:

Excel formula
=SUMIFS(D2:D8,C2:C8,"<>Cancelled")+SUMIFS(D2:D8,C2:C8,"<>Refunded")

This returns 9,250, far more than the 5,400 in the whole table. Each Paid order is "not Cancelled" and also "not Refunded", so it is counted twice. Adding formulas is how you get OR logic, which is the opposite of what you want here. See SUMIFS with OR logic for when adding is the right move.

How to use not equal to a cell value#

To exclude whatever is typed in a cell, keep the operator in quotes and join the cell with &. If G2 holds Cancelled:

Excel formula
=SUMIFS(D2:D8,C2:C8,"<>"&G2)

The result is 4,300, and it updates when you type a different status in G2. Writing "<>G2" instead would exclude the letters "G2", which match nothing, so you would get the full 5,400.

Not equal to a number, zero or blank#

The same <> works with numbers and empty cells:

GoalFormula
Skip order 1003=SUMIFS(D2:D8,A2:A8,"<>1003") → 4,950
Add only non-zero amounts=SUMIFS(D2:D8,D2:D8,"<>0")
Add rows where Status is not blank=SUMIFS(D2:D8,C2:C8,"<>")
Skip anything containing "cancel"=SUMIFS(D2:D8,C2:C8,"<>*cancel*") → 4,300

"<>" on its own means "not empty". The wildcard version catches "Cancelled", "cancelled by customer" and similar, because * stands for any text.

Not equal to in COUNTIFS and AVERAGEIFS#

The <> criteria work the same way in the other "IFS" functions, because they all share the same criteria rules. Only the first argument changes:

QuestionFormulaResult
How many orders are not cancelled?=COUNTIFS(C2:C8,"<>Cancelled")5
Average amount of orders not cancelled=AVERAGEIFS(D2:D8,C2:C8,"<>Cancelled")860
Largest order outside East=MAXIFS(D2:D8,B2:B8,"<>East")1200

COUNTIFS has no sum range, so it starts straight away with the criteria range. AVERAGEIFS and MAXIFS put the range of numbers first, like SUMIFS. Learning one set of criteria rules pays off across all of them.

Check your result with total minus excluded#

A quick way to check a "not equal" total is to subtract the excluded part from the grand total:

Excel formula
=SUM(D2:D8)-SUMIFS(D2:D8,C2:C8,"Cancelled")

That is 5,400 − 1,100 = 4,300, the same as the not-equal formula. If the two answers differ, look for text that only looks the same, such as "Cancelled " with a trailing space or "Canceled" with one L. Those cells don't match "Cancelled", so they slip through the exclusion. TRIM removes the stray spaces.

Other common causes of a wrong total:

  • The ranges are different sizes. SUMIFS returns #VALUE! when D2:D8 and C2:C9 don't match. Make every range cover the same rows.
  • You expected filtered rows to drop out. SUMIFS still adds rows hidden by a filter. Use SUBTOTAL or AGGREGATE when you need visible rows only.
  • The criteria cell is empty. If G2 is blank, "<>"&G2 becomes "<>", which means "not blank", and every filled row is added.

If your conditions get more complex than SUMIFS can handle, such as excluding by part of a date or by case, SUMPRODUCT vs SUMIFS explains when to switch.

Practise it#

Practise COUNTIFS and SUMIFS in a live spreadsheet: you type each formula, including <> conditions, and it checks your answer instantly. Then try the North, not refunded exercise on this page to lock in the syntax.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Total the Amount (D2:D8) for North orders that are not Refunded. In G2, use SUMIFS with one condition on Region (B2:B8) and a not equal to condition on Status (C2:C8).

fx
ABCDEFGH
1
Order
Region
Status
Amount
2
1001
North
Paid
1200
North, not refunded
3
1002
South
Cancelled
800
4
1003
North
Refunded
450
5
1004
East
Paid
950
6
1005
North
Paid
600
7
1006
South
Paid
1100
8
1007
East
Cancelled
300
9
10
11

Tip: Sum range first, then B2:B8 with "North", then C2:C8 with "<>Refunded". The answer is 1800.

Practise this in a lesson

LessonCOUNTIFS and SUMIFSCount and sum with several conditions at once, and learn why SUMIFS puts the sum range first.Function guideSUMIFSTotal values that meet several conditions with SUMIFS. Examples by region, month and number range, common errors, and live practice.

Frequently asked questions

How do you write not equal to in SUMIFS?

+

Use <> inside double quotes with the value, for example =SUMIFS(D2:D8,C2:C8,"<>Cancelled"). For a number, write "<>0". For a cell, join it with &: "<>"&G2.

How do I exclude multiple values in SUMIFS?

+

Add one condition for each value, using the same range each time: =SUMIFS(D2:D8,C2:C8,"<>Cancelled",C2:C8,"<>Refunded"). SUMIFS uses AND logic, so a row must pass every condition.

Is SUMIFS not equal to case-sensitive?

+

No. "<>cancelled" also excludes Cancelled and CANCELLED. If you need case to matter, use SUMPRODUCT with EXACT instead.

Why does my SUMIFS not equal formula include the value I wanted to exclude?

+

The cell usually has an extra space or slightly different spelling, so it is not an exact match. Clean the data with TRIM, or use a wildcard such as "<>cancel".

Can I use not equal to with a number in SUMIFS?

+

Yes. =SUMIFS(D2:D8,D2:D8,"<>0") adds all non-zero amounts, and "<>1003" skips the row whose ID is 1003. Put the operator and number together inside the quotes.

Sources

  • SUMIFS function - Microsoft Support
  • Calculation operators and precedence in Excel - Microsoft Support

Written and checked by the ExcelReady Team. First published November 2, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. How to write a SUMIFS not equal to formula
  2. How to combine not equal with other conditions
  3. How to exclude two or more values with SUMIFS
  4. How to use not equal to a cell value
  5. Not equal to a number, zero or blank
  6. Not equal to in COUNTIFS and AVERAGEIFS
  7. Check your result with total minus excluded
  8. Practise it

Keep reading

Conditional math· 7 min read

COUNTIFS and SUMIFS: Multiple Conditions in Excel

COUNTIFS counts rows that meet several conditions, and SUMIFS adds numbers from those rows. Each condition is a pair: a range, then its criteria. A row counts only if it matches every pair. SUMIFS puts the sum range first: =SUMIFS(E2:E9,A2:A9,"North",C2:C9,"Laptop") totals North laptop revenue.

Conditional math· 7 min read

SUMIFS With OR Logic in Excel

SUMIFS joins every condition with AND, so for OR you combine several sums. Add two SUMIFS: =SUMIFS(E2:E9,A2:A9,"North")+SUMIFS(E2:E9,A2:A9,"East"), or use an array constant: =SUM(SUMIFS(E2:E9,A2:A9,{"North","East"})). When the OR spans two different columns, use SUMPRODUCT so rows that match both aren't counted twice.

Conditional math· 6 min read

SUMIF Not Equal To: Exclude a Value From a Total

To sum everything except one value, use the not-equal-to operator <> inside quotes: =SUMIF(A2:A8,"<>North",C2:C8) adds the sales of every region except North. For a value in a cell, write "<>"&E1. To exclude two or more values, use SUMIFS with one "<>" condition for each value.

More on conditional math

  • Excel Wildcards: *, ? and ~ in COUNTIF and SUMIF
  • How to Calculate an Average by Group in Excel
  • AVERAGEIF and AVERAGEIFS in Excel
  • AVERAGEIFS in Excel: Averages With Several Conditions
  • Count Cells Above Average in Excel With COUNTIF
  • How to Count by Category in Excel
All conditional math articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free