Using SumIFS with Index and Match

Peter Davison

Active Member
Joined
Jun 4, 2020
Messages
435
Office Version
  1. 365
Platform
  1. Windows
I have an "output" file where I want to sum sales based on a cell criteria. My sum values are in the Performance Sheet C2:C200000. My criteria could be 1 of many which is in cell B4 selected from a lookup list. The data is in another file in the Product Sheet in a range of Cells C1:Z500 (Headings that relate to cell B4 are in Row1 but could be in any column). I have a list of attributes associated with B4 in cells B5 to B15. My formula is in C5 to start with and will then be copied down to the other cells C6 to C15.
The formula below is returning "VALUE" I think I have something wrong in the last part of the formula C1:Z500, but I'm not sure what it needs to be?

I would appreciate any help you can give me please.

=SUMIFS(INDEX('[Breakfast Foods Combined Raw Data.xlsx]Performance Data'!$C$2:$C$200000,,MATCH($B$4,'[Breakfast Foods Combined Raw Data.xlsx]Product Data'!$C$1:$Z$1,0)),'[Breakfast Foods Combined Raw Data.xlsx]Product Data'!$C$1:$Z$500,"="&$B5)
 

Attachments

  • SumIFS.JPG
    SumIFS.JPG
    51.8 KB · Views: 18

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
If the interval to be summed is on rows $2:$200000 then the criteria interval should similarly be 199999 lines long (ie cannot be $C$1:$Z$500)
Also, INDEX needs as first parametre an array (multi column) whereas you use a single column list ( $C$2:$C$200000)

Bye
 
Upvote 0
Thank you for your help.
It has been really very helpful.

I do have another query that I sent in the other day that no one has replied, I wondered if you would be able to help. (See below)


I'm trying to set a dynamic range in a chart
My header is in cell E16 and my data can be in cells E17 to E517 or more
For this example my data is only 200 cells created from formulas in the cells so I have 300 blank cells with formulas in.
I don't know how to make the dynamic range ignore the formula blank cells?
Any help would be appreciated.
Thanks

=OFFSET('Start Data1'!$E$16,0,0,COUNTA('Start Data1'!$E$17:$E$517)-1,1)
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,701
Members
448,980
Latest member
CarlosWin

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