Sumifs - Using Multiple Criteria and Multiple Values

JSH10

New Member
Joined
Jul 6, 2024
Messages
3
Office Version
  1. 365
Platform
  1. Windows
I want to return the Total Revenue from the below table (Table1), where Colour is = R & W, Item = A & B and Size = S & M. I tried using the formula below but it doesn't return the correct value. Adding multiple values to the third criteria range is the problem, it ignores all bar the first value in Criteria3. I assumed that the separator in Criteria2 ... CriteriaN would be ;

=SUM(SUMIFS(Table1[Revenue],Table1[Colour],{"R","W"},Table1[Item],{"A";"B"},Table1[Size],{"S";"M"}))

Any help would be greatly appreciated.

Thanks,
Jon

ColourItemSizeRevenue
RAS
100​
RAM
200​
RAL
300​
WAS
400​
WAM
500​
WAL
600​
BAS
700​
BAM
800​
BAL
900​
RBS
1000​
RBM
1100​
RBL
1200​
WBS
1300​
WBM
1400​
WBL
1500​
BBS
1600​
BBM
1700​
BBL
1800​
RCS
1900​
RCM
2000​
RCL
2100​
WCS
2200​
WCM
2300​
WCL
2400​
BCS
2500​
BCM
2600​
BCL
2700​
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Hello, try;

=SUM(SUMIFS(D2:D28, A2:A28,{"R","W"},B2:B28,{"A","B"},C2:C28,{"S","M"}))
 
Upvote 0
Hello - apologies, ignore, previous post,try this;

=SUM(SUMIFS(D2:D28,A2:A28, F2:F3, B2:B28, F5:F6, C2:C28, F8:F9))

F2:F3 is W and A for the colours, F5:F6 is A and B for the items, F8:F9 is L and S for the sizes.
 
Upvote 1
Try:
Excel Formula:
=SUM(Table1[Revenue]*((Table1[Colour]="R")+(Table1[Colour]="W"))*((Table1[Item]="A")+(Table1[Item]="B"))*((Table1[Size]="S")+(Table1[Size]="M")))

For ease of interpretation you can show it this way:
Excel Formula:
=SUM(Table1[Revenue]
               *((Table1[Colour]="R") + (Table1[Colour]="W"))
               *((Table1[Item]="A")     + (Table1[Item]="B"))
               *((Table1[Size]="S")      + (Table1[Size]="M")))
 
Upvote 1
Solution
Hi & welcome to MrExcel.
Adding multiple values to the third criteria range is the problem, it ignores all bar the first value in Criteria3
All the xxxIFS function can only accept 2 arrays (one vertical & one horizontal). So when you have 3 or more arrays, you need to do it like Alex has shown.
 
Upvote 1
Try:
Excel Formula:
=SUM(Table1[Revenue]*((Table1[Colour]="R")+(Table1[Colour]="W"))*((Table1[Item]="A")+(Table1[Item]="B"))*((Table1[Size]="S")+(Table1[Size]="M")))

For ease of interpretation you can show it this way:
Excel Formula:
=SUM(Table1[Revenue]
               *((Table1[Colour]="R") + (Table1[Colour]="W"))
               *((Table1[Item]="A")     + (Table1[Item]="B"))
               *((Table1[Size]="S")      + (Table1[Size]="M")))
Thanks Alex
 
Upvote 0
Hello - apologies, ignore, previous post,try this;

=SUM(SUMIFS(D2:D28,A2:A28, F2:F3, B2:B28, F5:F6, C2:C28, F8:F9))

F2:F3 is W and A for the colours, F5:F6 is A and B for the items, F8:F9 is L and S for the sizes.
Hi Nick, thanks for the reply. Unfortunately this didn't work, however, I was able to resolve the problem using sumproduct.
 
Upvote 0
Ah no problem at all - as Fluff explained, I tried to do the SUMIFS based on more than two arrays which ultimately didn't work but Alex's method worked perfectly when I tested it myself on the extracted data so in hindsight, I should have used the SUMPRODUCT instead. We learn something every day I suppose!! Take care.
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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