Sumifs using more than one axis???? Crazy!!!!

Mark McInerney

Active Member
Joined
Apr 4, 2012
Messages
266
Office Version
  1. 365
Platform
  1. 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?

ABCDEFGHI
1YearWeekShopBeer SalesWine SalesSpirit Sales
220171West500100300
320171North200400500
420171South100500300
520172West200500350
620181North400200500
720182West200200600
8
9

<tbody>
</tbody>
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Try

=SUMPRODUCT((A2:A7=2017)*(B2:B7<=3)*(C2:C7="West")*(D1:F1="Wine Sales")*(D2:F7))

Change the criteria to ref the drop down cells
 
Last edited:
Upvote 0
Like

=SUMPRODUCT((A2:A7=A10)*(B2:B7<=A11)*(C2:C7=A12)*(D1:F1=A13)*(D2:F7))

Code:
[TABLE="width: 532"]
<tbody>[TR]
[TD="class: xl63, width: 87"]Year[/TD]
[TD="class: xl63, width: 87"]Week[/TD]
[TD="class: xl63, width: 97"]Shop[/TD]
[TD="class: xl63, width: 87"]Beer Sales[/TD]
[TD="class: xl63, width: 87"]Wine Sales[/TD]
[TD="class: xl63, width: 87"]Spirit Sales[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2017[/TD]
[TD="class: xl63, align: right"]1[/TD]
[TD="class: xl63"]West[/TD]
[TD="class: xl63, align: right"]500[/TD]
[TD="class: xl63, align: right"]100[/TD]
[TD="class: xl63, align: right"]300[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2017[/TD]
[TD="class: xl63, align: right"]1[/TD]
[TD="class: xl63"]North[/TD]
[TD="class: xl63, align: right"]200[/TD]
[TD="class: xl63, align: right"]400[/TD]
[TD="class: xl63, align: right"]500[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2017[/TD]
[TD="class: xl63, align: right"]1[/TD]
[TD="class: xl63"]South[/TD]
[TD="class: xl63, align: right"]100[/TD]
[TD="class: xl63, align: right"]500[/TD]
[TD="class: xl63, align: right"]300[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2017[/TD]
[TD="class: xl63, align: right"]2[/TD]
[TD="class: xl63"]West[/TD]
[TD="class: xl63, align: right"]200[/TD]
[TD="class: xl63, align: right"]500[/TD]
[TD="class: xl63, align: right"]350[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2018[/TD]
[TD="class: xl63, align: right"]1[/TD]
[TD="class: xl63"]North[/TD]
[TD="class: xl63, align: right"]400[/TD]
[TD="class: xl63, align: right"]200[/TD]
[TD="class: xl63, align: right"]500[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2018[/TD]
[TD="class: xl63, align: right"]2[/TD]
[TD="class: xl63"]West[/TD]
[TD="class: xl63, align: right"]200[/TD]
[TD="class: xl63, align: right"]200[/TD]
[TD="class: xl63, align: right"]600[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2017[/TD]
[TD="align: right"]600[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]West[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Wine Sales[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,215,509
Messages
6,125,216
Members
449,215
Latest member
texmansru47

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