Mark McInerney
Active Member
- Joined
- Apr 4, 2012
- Messages
- 283
- Office Version
- 365
- Platform
- Windows
Hi,
I have the following as an example of the data that I am working with.
I am trying to get a formula that allows me to select the year, week number, and shop, and also allow me to dynamically select the sales (Beer or Wine or Spirits) and then sum them over a period that I define e.g. I want to sum all sales where the year is 2017, the week range is between 1 and 3, the Shop is West, and the category are wine sales only ( I will be selecting all the values from a drop down box).
Is this possible?
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Year[/TD]
[TD]Week[/TD]
[TD]Shop[/TD]
[TD]Beer Sales[/TD]
[TD]Wine Sales[/TD]
[TD]Spirit Sales[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]2017[/TD]
[TD]1[/TD]
[TD]West[/TD]
[TD]500[/TD]
[TD]100[/TD]
[TD]300[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]2017[/TD]
[TD]1[/TD]
[TD]North[/TD]
[TD]200[/TD]
[TD]400[/TD]
[TD]500[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]2017[/TD]
[TD]1[/TD]
[TD]South[/TD]
[TD]100[/TD]
[TD]500[/TD]
[TD]300[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]2017[/TD]
[TD]2[/TD]
[TD]West[/TD]
[TD]200[/TD]
[TD]500[/TD]
[TD]350[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]2018[/TD]
[TD]1[/TD]
[TD]North[/TD]
[TD]400[/TD]
[TD]200[/TD]
[TD]500[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]2018[/TD]
[TD]2[/TD]
[TD]West[/TD]
[TD]200[/TD]
[TD]200[/TD]
[TD]600[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I have the following as an example of the data that I am working with.
I am trying to get a formula that allows me to select the year, week number, and shop, and also allow me to dynamically select the sales (Beer or Wine or Spirits) and then sum them over a period that I define e.g. I want to sum all sales where the year is 2017, the week range is between 1 and 3, the Shop is West, and the category are wine sales only ( I will be selecting all the values from a drop down box).
Is this possible?
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Year[/TD]
[TD]Week[/TD]
[TD]Shop[/TD]
[TD]Beer Sales[/TD]
[TD]Wine Sales[/TD]
[TD]Spirit Sales[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]2017[/TD]
[TD]1[/TD]
[TD]West[/TD]
[TD]500[/TD]
[TD]100[/TD]
[TD]300[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]2017[/TD]
[TD]1[/TD]
[TD]North[/TD]
[TD]200[/TD]
[TD]400[/TD]
[TD]500[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]2017[/TD]
[TD]1[/TD]
[TD]South[/TD]
[TD]100[/TD]
[TD]500[/TD]
[TD]300[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]2017[/TD]
[TD]2[/TD]
[TD]West[/TD]
[TD]200[/TD]
[TD]500[/TD]
[TD]350[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]2018[/TD]
[TD]1[/TD]
[TD]North[/TD]
[TD]400[/TD]
[TD]200[/TD]
[TD]500[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]2018[/TD]
[TD]2[/TD]
[TD]West[/TD]
[TD]200[/TD]
[TD]200[/TD]
[TD]600[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]