SUMIFS needed

RodneyC

Active Member
Joined
Nov 4, 2021
Messages
278
Office Version
  1. 2016
Platform
  1. Windows
I'm trying to look on my Revenue Analysis tab for two criteria:

1. First criteria - does it find the value in $D$25 on the Revenue Analysis tab in the range $C2$1185. (It will find this multiple times.)
2. Second criteria, does it find the value in $N$1 on the revenue tab in the range $T$2:$T$1185. If/wherever it finds it, then SUM those values and divide by the value in $M$1
3. Second Criteria continued - If instead of the value in $N$1 it finds the value in $N$2 in the range $T$2:$T$1185 SUM those values and divide by the value in $M$2
4. Second Criteria continued - If instead of the value in $N$1 it finds the value in $N$3 in the range $T$2:$T$1185 SUM those values and divide by the value in $M$3
5. Second Criteria continued - If instead of the value in $N$1 it finds the value in $N$4 in the range $T$2:$T$1185 SUM those values and divide by the value in $M$4

I've started here, but have become lost.

=SUMIFS('Revenue Analysis'!C3:C1185,$D$25,'Revenue Analysis'!T2:T1185,N1) "too many arguments"

Thanks in advance
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Hi Rodney,

Is this question related or the same as your previous 1 from yesterday?

It will help us immensely if you can post some sample data, this way we don't need to create fictional data that might not properly represent your sheet.

This may also lead us to a simpler solution.

Post your Sample data with XL2BB
 
Upvote 0
It's a result of the question from yesterday. I solved that problem by simply pulling data from each column into a new column on the other tab, using a forth column to sum then divide, then hiding what I wanted hidden. Easier solution than I thought was needed. I

Regarding this issue, I'll dummy up some "non-sensitive" data and post here later.
 
Upvote 0
I hope this doesn't make it more confusing, but here goes:

Lets say someone selected “Purple” from the Drop Down Menu . Note in column B next to Purple is the value 2. Likewise with Red, Black etc. If they had selected Blue or Yellow, etc. the value would be 3 and so on. These values in column B can be referenced in N1:N4

I need a formula in Recap E25 that will ask these questions and report this result:
  1. What value is selected in Recap D4. In this case, it is Purple.
  2. What value is selected in Recap D25. In this case it is Walrus.
  3. Look on the Revenue Analysis $C$2:$C$1185 for the value Walrus AND where the value in $T$2:$T$1185 = the value associated with the selected value in D4, in this case Purple which produces 2 in column T. It doesn’t show on this screen shot, but there are multiple places where the value in column $T$2:$T$1185 is 2. If a user selected Blue, column T would produce 3,
  4. For formula purposes, instead of referring to “2” I’d prefer to use $N$2 as shown on the Recap tab. This will allow me to change that with one entry if ever needed.
  5. SUM all of the places where these criteria are met.
  6. Now that the formula has calculated this SUM, divide this by the value in M2, in this case 5. This represents the number of “colors” that meet the N2 qualification and is used to get my average.
The formula needs to be smart enough to produce the resulting average regardless of what they select in the drop down menu, using the correct M1:M4 value based on the corresponding value in N1:N4 pulled from column T on the Revenue Analysis tab.

I’ll need to change the formula so that it can be used down the line for D26, D27 and so on.

Thank you

1643760067196.png
 
Upvote 0
I can't quite make out the dates on Rev Analysis, I assume they are daily sales samples

On Recap we can sum revenue by Color & Product for between each month e.g Dec/Nov/Oct like in my sample

Hopefully I'm close by returning from RA 3 for Blue which then gets Size 4 to divide Month sales by Avg Size?

Book1
BCDEFGHIJKLMNOT
1MarketName1/12/20212/12/20213/12/20211/11/20212/11/20213/11/20214/11/20211/10/20212/10/20213/10/20214/10/20215/10/2021Color
2PurpleWalrus2
3PurpleHippo30202
4PurpleApe2002
5PurpleLion2
6PurpleTiger2
7BlueWalrus1020301517182025293924173
8BlueHippo1020301517182025293924173
9BlueApe1020301517182025293924173
10BlueLion1020301517182025293924173
11BlueTiger1020301517182025293924173
12GreenWalrus1112131415161718192021224
13GreenHippo1112131415161718192021224
14GreenApe1112131415161718192021224
15GreenLion1112131415161718192021224
16GreenTiger1112131415161718192021224
Revenue Analysis


Book1
ABCDEFGHILMN
1Sizes31
2Sizes52
3Sizes43
4EverythingBlueFavoriteSizes24
5Purple
6BlueColorSales1/12/20211/11/20211/10/2021MOM $MOM %
7Green3Walrus6070134
83Hippo6070134
93Ape6070134
103Lion6070134
113Tiger6070134
12
13AVG FactorColorAverage
1443Walrus1517.533.5
1543Hippo1517.533.5
1643Ape1517.533.5
1743Lion1517.533.5
1843Tiger1517.533.5
Recap
Cell Formulas
RangeFormula
E7:G11E7=SUMPRODUCT(('Revenue Analysis'!$B$2:$B$16=Recap!$D$4)*('Revenue Analysis'!$C$2:$C$16=Recap!$D7)*('Revenue Analysis'!$D$1:$O$1>=Recap!E$6)*('Revenue Analysis'!$D$1:$O$1<=EOMONTH(Recap!E$6,0))*'Revenue Analysis'!$D$2:$O$16)
C7:C11,C14:C18C7=INDEX('Revenue Analysis'!$T$2:$T$16,MATCH(Recap!$D$4,'Revenue Analysis'!$B$2:$B$16,0))
B14:B18B14=INDEX($M$1:$M$4,MATCH(C14,$N$1:$N$4,0))
E14:G18E14=SUMPRODUCT(('Revenue Analysis'!$B$2:$B$16=Recap!$D$4)*('Revenue Analysis'!$C$2:$C$16=Recap!$D7)*('Revenue Analysis'!$D$1:$O$1>=Recap!E$6)*('Revenue Analysis'!$D$1:$O$1<=EOMONTH(Recap!E$6,0))*'Revenue Analysis'!$D$2:$O$16)/$B14
Cells with Data Validation
CellAllowCriteria
D4List=$A$4:$A$7
 
Upvote 0
I can't quite make out the dates on Rev Analysis, I assume they are daily sales samples

On Recap we can sum revenue by Color & Product for between each month e.g Dec/Nov/Oct like in my sample

Hopefully I'm close by returning from RA 3 for Blue which then gets Size 4 to divide Month sales by Avg Size?

Book1
BCDEFGHIJKLMNOT
1MarketName1/12/20212/12/20213/12/20211/11/20212/11/20213/11/20214/11/20211/10/20212/10/20213/10/20214/10/20215/10/2021Color
2PurpleWalrus2
3PurpleHippo30202
4PurpleApe2002
5PurpleLion2
6PurpleTiger2
7BlueWalrus1020301517182025293924173
8BlueHippo1020301517182025293924173
9BlueApe1020301517182025293924173
10BlueLion1020301517182025293924173
11BlueTiger1020301517182025293924173
12GreenWalrus1112131415161718192021224
13GreenHippo1112131415161718192021224
14GreenApe1112131415161718192021224
15GreenLion1112131415161718192021224
16GreenTiger1112131415161718192021224
Revenue Analysis


Book1
ABCDEFGHILMN
1Sizes31
2Sizes52
3Sizes43
4EverythingBlueFavoriteSizes24
5Purple
6BlueColorSales1/12/20211/11/20211/10/2021MOM $MOM %
7Green3Walrus6070134
83Hippo6070134
93Ape6070134
103Lion6070134
113Tiger6070134
12
13AVG FactorColorAverage
1443Walrus1517.533.5
1543Hippo1517.533.5
1643Ape1517.533.5
1743Lion1517.533.5
1843Tiger1517.533.5
Recap
Cell Formulas
RangeFormula
E7:G11E7=SUMPRODUCT(('Revenue Analysis'!$B$2:$B$16=Recap!$D$4)*('Revenue Analysis'!$C$2:$C$16=Recap!$D7)*('Revenue Analysis'!$D$1:$O$1>=Recap!E$6)*('Revenue Analysis'!$D$1:$O$1<=EOMONTH(Recap!E$6,0))*'Revenue Analysis'!$D$2:$O$16)
C7:C11,C14:C18C7=INDEX('Revenue Analysis'!$T$2:$T$16,MATCH(Recap!$D$4,'Revenue Analysis'!$B$2:$B$16,0))
B14:B18B14=INDEX($M$1:$M$4,MATCH(C14,$N$1:$N$4,0))
E14:G18E14=SUMPRODUCT(('Revenue Analysis'!$B$2:$B$16=Recap!$D$4)*('Revenue Analysis'!$C$2:$C$16=Recap!$D7)*('Revenue Analysis'!$D$1:$O$1>=Recap!E$6)*('Revenue Analysis'!$D$1:$O$1<=EOMONTH(Recap!E$6,0))*'Revenue Analysis'!$D$2:$O$16)/$B14
Cells with Data Validation
CellAllowCriteria
D4List=$A$4:$A$7
Thanks for the help. My wife is asking "when are you coming downstairs to watch the movie with us?" I'll dive into this tomorrow AM.
 
Upvote 0
I think there's an easier way to do this, just using SUMIFS. Stay tuned
 
Upvote 0

Forum statistics

Threads
1,214,648
Messages
6,120,726
Members
448,987
Latest member
marion_davis

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