ExcelReady
CourseFunction guidesBlog
Start freeStart learning for free
ExcelReady

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

Learn

  • Course
  • Function guides
  • Blog

Product

  • Certificate

Company

  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Conditional math
  3. SUMIFS With OR Logic in Excel

SUMIFS With OR Logic in Excel

By ExcelReady Team·Updated October 30, 2026·7 min read

The short answer

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.

Key takeaways

  • SUMIFS treats every condition as AND; there is no OR switch inside it.
  • For OR within one column, add SUMIFS together or use =SUM(SUMIFS(...,{"North","East"})).
  • Putting two criteria on the same column in one SUMIFS returns 0, because no cell can be North and East at once.
  • For OR across two columns, adding SUMIFS double-counts rows that match both; use SUMPRODUCT with (test1+test2>0).
  • The same patterns work for COUNTIFS and AVERAGEIFS.
On this page+
  1. Why SUMIFS can't do OR on its own
  2. Method 1: Add two SUMIFS together
  3. Method 2: Use an array constant inside SUM
  4. Method 3: SUMPRODUCT for OR across different columns
  5. Which SUMIFS OR method should you use?
  6. The same trick for COUNTIFS and AVERAGEIFS
  7. Common mistakes with SUMIFS and OR
  8. Practise it

SUMIFS adds numbers that meet every condition you give it, which is AND logic. To sum with an OR condition, such as "North or East", you add separate sums together, use an array constant, or use SUMPRODUCT. This guide is for anyone who already uses SUMIFS and keeps hitting the "or" case, and it shows each method on the same sales table with the results.

Why SUMIFS can't do OR on its own#

SUMIFS only adds a row when all its conditions are TRUE. That's what you want for "North and Laptop", but not for "North or East".

Here is the sales data used throughout this guide:

ABCDE
1RegionRepProductUnitsRevenue
2NorthKofiLaptop32,700
3EastMiaMonitor51,250
4SouthLeoLaptop21,800
5NorthKofiMonitor41,000
6WestSaraLaptop1900
7EastMiaLaptop21,800
8SouthLeoMonitor61,500
9EastTomKeyboard10400

The tempting formula is wrong:

Excel formula
=SUMIFS(E2:E9,A2:A9,"North",A2:A9,"East")

It returns 0, because it asks for rows where the region is North and East at the same time. No row can be both. If AND and OR are still fuzzy, the guide to AND, OR and NOT in Excel explains the difference with simple tests.

Method 1: Add two SUMIFS together#

The simplest way to get OR is one SUMIFS per option, joined with +.

Excel formula
=SUMIFS(E2:E9,A2:A9,"North")+SUMIFS(E2:E9,A2:A9,"East")

North is 2,700 + 1,000 = 3,700, and East is 1,250 + 1,800 + 400 = 3,450. The result is 7,150.

This works in every version of Excel and is easy to read in a test. Its only downside is length: five options means five SUMIFS. For a reminder of the argument order (the sum range comes first in SUMIFS), see the COUNTIFS and SUMIFS guide or the SUMIFS function reference.

Method 2: Use an array constant inside SUM#

An array constant is a list of values in curly braces, such as {"North","East"}. Put it in the criteria slot and SUMIFS calculates one total per item. SUM then adds them.

Excel formula
=SUM(SUMIFS(E2:E9,A2:A9,{"North","East"}))

SUMIFS returns two totals, 3,700 and 3,450, and SUM gives 7,150. You type the braces yourself; this is not a Ctrl+Shift+Enter formula, and it works in all current Excel versions.

You can mix OR and AND. North or East, but only Laptops:

Excel formula
=SUM(SUMIFS(E2:E9,A2:A9,{"North","East"},C2:C9,"Laptop"))

The result is 4,500 (North Laptop 2,700 + East Laptop 1,800).

To use a list of regions typed in cells, say H2:H3, instead of typing them into the formula, use =SUMPRODUCT(SUMIFS(E2:E9,A2:A9,H2:H3)). SUMPRODUCT handles the range without special entry in older versions; in Microsoft 365, =SUM(SUMIFS(E2:E9,A2:A9,H2:H3)) also works.

Method 3: SUMPRODUCT for OR across different columns#

When the OR uses two different columns, adding SUMIFS counts some rows twice. Take "Region is North OR Product is Laptop":

Excel formula
=SUMIFS(E2:E9,A2:A9,"North")+SUMIFS(E2:E9,C2:C9,"Laptop")

This returns 10,900, which is too high. Row 2 (North and Laptop, 2,700) is counted in both SUMIFS. The true total is 8,200.

SUMPRODUCT fixes this by testing each row once:

Excel formula
=SUMPRODUCT(((A2:A9="North")+(C2:C9="Laptop")>0)*E2:E9)

How it works:

  1. (A2:A9="North")+(C2:C9="Laptop") adds two TRUE/FALSE tests, giving 0, 1 or 2 for each row.
  2. >0 turns that into TRUE when at least one test passed, so a row that passes both still counts once.
  3. Multiplying by E2:E9 keeps the revenue for those rows, and SUMPRODUCT adds it up.

The result is 8,200. If you prefer SUMIFS, subtract the overlap: =SUMIFS(E2:E9,A2:A9,"North")+SUMIFS(E2:E9,C2:C9,"Laptop")-SUMIFS(E2:E9,A2:A9,"North",C2:C9,"Laptop") also gives 8,200. Our SUMPRODUCT guide explains how multiplying tests works.

Which SUMIFS OR method should you use?#

SituationBest methodExample result
OR on one column, 2–3 optionsAdd SUMIFS7,150
OR on one column, many optionsSUM(SUMIFS(...,{...}))7,150
OR on one column, plus AND on anotherSUM(SUMIFS(...,{...},C2:C9,"Laptop"))4,500
OR across two different columnsSUMPRODUCT with >08,200
Everything except a few valuesSUMIFS with "<>"see below

OR also works with numbers, for example orders that are very small or very large. Total the revenue where Units are under 2 or over 5:

Excel formula
=SUMIFS(E2:E9,D2:D9,"<2")+SUMIFS(E2:E9,D2:D9,">5")

The first SUMIFS picks up row 6 (900), the second picks up rows 8 and 9 (1,500 + 400), and the result is 2,800. No row can be both under 2 and over 5, so there's no double counting. For a range in the middle, such as 2 to 5 units, you need AND instead: =SUMIFS(E2:E9,D2:D9,">=2",D2:D9,"<=5").

For "everything except South and West", AND works naturally: =SUMIFS(E2:E9,A2:A9,"<>South",A2:A9,"<>West") returns 7,150, the same as North plus East here.

The same trick for COUNTIFS and AVERAGEIFS#

Every method above works for counting. To count North or East orders:

Excel formula
=SUM(COUNTIFS(A2:A9,{"North","East"}))

The result is 5. For averages, don't average the two averages, because the groups have different sizes. Divide the OR sum by the OR count instead: =SUM(SUMIFS(E2:E9,A2:A9,{"North","East"}))/SUM(COUNTIFS(A2:A9,{"North","East"})) returns 1,430. For counting filled cells with conditions, see count non-blank cells with a condition, and for counting distinct names see how to count unique values.

Common mistakes with SUMIFS and OR#

  • Two criteria on the same column in one SUMIFS, which returns 0.
  • Adding SUMIFS across different columns and double-counting the overlap.
  • Putting the sum range last. That's SUMIF's order; SUMIFS wants it first.
  • Typing {"North";"East"} and {"Laptop","Monitor"} together without understanding them. Two array constants in one SUMIFS make a grid of combinations (a semicolon makes a vertical list, a comma a horizontal one). It works, giving 6,750 for North/East × Laptop/Monitor here, but it is easy to get wrong in a test.

These OR totals come up in HR reports too, such as headcount cost for two departments; see the Excel skills for HR jobs.

Practise it#

Try the live exercise on this page to total North or East revenue. Then practise COUNTIFS and SUMIFS in a live spreadsheet to get the argument order automatic, and use the AND, OR and NOT lesson to see how Excel combines TRUE and FALSE tests.

Try it yourself

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

In G2, total the Revenue (E2:E9) for orders from the North OR the East region (A2:A9). Add two SUMIFS formulas together.

fx
ABCDEFGH
1
Region
Rep
Product
Units
Revenue
North or East
2
North
Kofi
Laptop
3
2700
3
East
Mia
Monitor
5
1250
4
South
Leo
Laptop
2
1800
5
North
Kofi
Monitor
4
1000
6
West
Sara
Laptop
1
900
7
East
Mia
Laptop
2
1800
8
South
Leo
Monitor
6
1500
9
East
Tom
Keyboard
10
400
10
11
12

Tip: Write one SUMIFS for North, then + and a second SUMIFS for East. The sum range E2:E9 comes first.

Practise this in a lesson

LessonCOUNTIFS and SUMIFSCount and sum with several conditions at once, and learn why SUMIFS puts the sum range first.LessonAND, OR and NOTCheck several conditions at once with AND and OR, flip a result with NOT, and combine them inside IF.Function guideSUMIFSTotal values that meet several conditions with SUMIFS. Examples by region, month and number range, common errors, and live practice.

Frequently asked questions

Can SUMIFS use OR logic?

+

Not directly. SUMIFS only sums rows that meet all of its conditions. For OR, add two SUMIFS together, use an array constant like {"North","East"} inside SUM, or switch to SUMPRODUCT.

Why does SUMIFS return 0 with two criteria on the same column?

+

Because SUMIFS uses AND. =SUMIFS(E2:E9,A2:A9,"North",A2:A9,"East") asks for rows where the region is North and East at the same time, which never happens.

What does {"North","East"} do inside SUMIFS?

+

It is an array constant: SUMIFS runs once for North and once for East and returns two totals. SUM around it adds the two together.

How do I sum with OR across two different columns?

+

Use =SUMPRODUCT(((A2:A9="North")+(C2:C9="Laptop")>0)*E2:E9). The >0 makes a row count once even when both tests are TRUE.

Does this work for COUNTIFS too?

+

Yes. =SUM(COUNTIFS(A2:A9,{"North","East"})) counts rows that are North or East.

Sources

  • SUMIFS function - Microsoft Support
  • SUMPRODUCT function - Microsoft Support

Written and checked by the ExcelReady Team. First published October 30, 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. Why SUMIFS can't do OR on its own
  2. Method 1: Add two SUMIFS together
  3. Method 2: Use an array constant inside SUM
  4. Method 3: SUMPRODUCT for OR across different columns
  5. Which SUMIFS OR method should you use?
  6. The same trick for COUNTIFS and AVERAGEIFS
  7. Common mistakes with SUMIFS and OR
  8. Practise it

Keep reading

Conditional math· 6 min read

How to Count Unique Values in Excel

In Excel 2021 and Microsoft 365, count unique values with =COUNTA(UNIQUE(B2:B11)): UNIQUE lists each different value once and COUNTA counts the list. Add a condition with FILTER, as in =COUNTA(UNIQUE(FILTER(B2:B11,C2:C11="East"))). In older Excel, use =SUMPRODUCT(1/COUNTIF(B2:B11,B2:B11)) instead.

Conditional math· 6 min read

Count Non-Blank Cells With a Condition in Excel

To count cells that are not blank, use =COUNTIF(C2:C8,"<>"), where "<>" means "not equal to nothing". To add a condition, use COUNTIFS: =COUNTIFS(B2:B8,"Sales",D2:D8,"<>") counts Sales rows whose column D is filled in. Use "" instead of "<>" to count the blank ones. COUNTA also counts non-blank cells, but takes no condition.

Tests & careers· 5 min read

Excel Skills for HR and Recruiting Jobs

The most useful Excel skills for HR and recruiting are counting headcount with COUNTIFS, totalling payroll with SUMIFS, calculating tenure and time to hire with DATEDIF, TODAY and date subtraction, looking up employee records with XLOOKUP or VLOOKUP, flagging eligibility with IF and AND, and cleaning names and dates so reports stay accurate.

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback. The first lessons are free, with no download.

Start learning for free