SUMIFS Multiple Criteria in Multiple Columns

john-paul

New Member
Joined
Nov 23, 2008
Messages
34
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have a table from A1 with two columns containing multiple criteria, and column C with amounts.

Criteria ranges:
Region Selected input range: E2 (North) E3 (South)
Division Selected input range: F2 (Manufacturing) F3 (Advertising)

Hoping for a sumifs formula that references the ranges in E2:E3 and F2:F3 to sum North or South where Manufacturing or Advertising so it should sum to 400.


Thanks, John

RegionDivision$
NorthManufacturing100
NorthAdvertising100
SouthManufacturing100
SouthAdvertising100
EastManufacturing100
EastAdvertising100
NorthFinance100
SouthFinance100
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
You can do it like this, note that the second array uses a semicolon delimiter instead of the usual comma.
Book1
ABCDE
1RegionDivision$
2NorthManufacturing100400
3NorthAdvertising100
4SouthManufacturing100
5SouthAdvertising100
6EastManufacturing100
7EastAdvertising100
8NorthFinance100
9SouthFinance100
Sheet1
Cell Formulas
RangeFormula
E2E2=SUM(SUMIFS($C$2:$C$9,$A$2:$A$9,{"North","South"},$B$2:$B$9,{"advertising";"manufacturing"}))
 
Upvote 0
Thanks jasonb75.

Is it possible to use the ranges E2:E3 and F2:F3 in the formula for when the input in these ranges change?
 
Upvote 0
Sorry, I think that I must have read that part of your question with my eyes closed :oops:

If you're using excel 2019 (or older) then you will need to array confirm the formula with Ctrl Shift Enter.
Book1
ABCDEF
1RegionDivision$
2NorthManufacturing100NorthManufacturing
3NorthAdvertising100SouthAdvertising
4SouthManufacturing100
5SouthAdvertising100400
6EastManufacturing100
7EastAdvertising100
8NorthFinance100
9SouthFinance100
Sheet1
Cell Formulas
RangeFormula
E5E5=SUM(SUMIFS($C$2:$C$9,$A$2:$A$9,$E$2:$E$3,$B$2:$B$9,TRANSPOSE($F$2:$F$3)))
 
Upvote 0
Solution
Thanks, that works perfectly.
Didn't realise I needed TRANSPOSE, or to use a semicolon delimiter in the earlier version.
 
Upvote 0
When you use sumifs in this way, one of the array criteria must be horizontal (comma delimiter) and the other vertical (semicolon delimiter).
With the criteria in cells, using TRANSPOSE changes the direction of that array (it doesn't matter which one).

If you have both arrays in the same orientation then the criteria are paired in their rows, using your example it would only pick up North Manufacturing and South Advertising, the other pairings would not be included.

If you needed more than 2 sets of multiple criteria columns then this method would not work. There are a few ways of doing it with more criteria depending on the requirements and the version of excel.
 
Upvote 0
Thank you not just for the formula, but also how and why it works.
 
Upvote 0

Forum statistics

Threads
1,214,601
Messages
6,120,467
Members
448,965
Latest member
grijken

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top