colinheslop1984
Board Regular
- Joined
- Oct 14, 2016
- Messages
- 129
- Office Version
- 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
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