sumifs index

colinheslop1984

Board Regular
Joined
Oct 14, 2016
Messages
129
Office Version
  1. 2016
I have a workbook with a large number of sheets used as data sources. Each sheet represents a week of the year.

I am using an indirect formula to sum a range based on 2 criteria - the sheet name (for simplicity call it criteria A) and then an item within that sheet (criteria B). Shown below. This works fine.

=SUMIF(INDIRECT("'"&$K$9&"'!c$12:c$25"),F$10:F$23,INDIRECT("'"&$K$9&"'!h$12:h$25"))​

What I now want to do is collate pretty much the same info but for multiple ranges at a time, to give me a month overview.

i.e sheets 1816,1817,1818 and 1819 all fall within the month of October, I want the sum of all these sheets if it meets criteria B.

The column 'week' contains the tab name for the representative week of information. Column 'month' is the month it falls under. Where it says select month I have inserted a list where the user can select which month to view.

So I need a formula that will look up which weeks fall under the selected month and sum the sales value for John, Peter, etc (just to complicate things I have 2 years of info meaning that the year column will need to be taken in to account as an additional criteria, hence select year list.



[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]week[/TD]
[TD]month[/TD]
[TD]year[/TD]
[TD]<select year>[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1815[/TD]
[TD]September[/TD]
[TD]2018[/TD]
[TD]<Select Month>[/TD]
[TD]Sold[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1816[/TD]
[TD]October[/TD]
[TD]2018[/TD]
[TD]John[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1817[/TD]
[TD]October[/TD]
[TD]2018[/TD]
[TD]Peter[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1818[/TD]
[TD]October[/TD]
[TD]2018[/TD]
[TD]Paul[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1819[/TD]
[TD]October[/TD]
[TD]2018[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


Hopefully that makes sense. Any help would be appreciated.

Please provide formula solution as i'm not that savvy with excel :)
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,223,907
Messages
6,175,300
Members
452,633
Latest member
DougMo

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