SUMIFS with INDEX MATCH at a loss

DEHA11

New Member
Joined
Jun 25, 2018
Messages
15
I have a worksheet called "Summary" that should show the total sales by month by category. On a separate worksheet, called "2019", I have a list of sales. I am trying to update the "Summary" worksheet to show the sum of all of sales for each category for each month.

The formula I have at this time is returning 0. This indicated cell should return 5,550

??? =SUMIF('2019'!$L:$L,(INDEX('2019'!$A$2:$M$500,0,MATCH(P$3,'2019'!$A:$A,0),MATCH($A5,'2019'!$E$1:$E$500,0))))

(I've omitted columns that are not relevant to my question in the sample below)

"SUMMARY" worksheet
[TABLE="width: 250"]
<tbody>[TR]
[TD]
[/TD]
[TD]A[/TD]
[TD]N[/TD]
[TD]O[/TD]
[TD]P[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]CAT[/TD]
[TD][/TD]
[TD][/TD]
[TD]MTH[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]JAN[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]BINS[/TD]
[TD][/TD]
[TD][/TD]
[TD]???[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]PARTS[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

"2019" worksheet
[TABLE="width: 250"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]E[/TD]
[TD]L[/TD]
[TD]M[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]MTH[/TD]
[TD]CAT[/TD]
[TD]AMT[/TD]
[TD]CUST[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]JAN[/TD]
[TD]BINS[/TD]
[TD]5,000[/TD]
[TD]BOB SMITH[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]JAN[/TD]
[TD]PARTS[/TD]
[TD]1,200[/TD]
[TD]DAN PETERS[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]JAN[/TD]
[TD]BINS[/TD]
[TD]550[/TD]
[TD]JASON BROWN[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]FEB[/TD]
[TD]PARTS[/TD]
[TD]250[/TD]
[TD]SCOTT FINDE[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]FEB[/TD]
[TD]BINS[/TD]
[TD]2,500[/TD]
[TD]BOB SMITH[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]FEB[/TD]
[TD]MISC[/TD]
[TD]150[/TD]
[TD]DAN PETERS[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]FEB[/TD]
[TD]PARTS[/TD]
[TD]300[/TD]
[TD]BOB SMITH[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
This may meet your needs - it uses SUMIFS. The 2019 tab used is cloned from your example, but the summary used different cells.
[TABLE="class: grid, width: 256"]
<tbody>[TR]
[TD="width: 64"]CAT[/TD]
[TD="width: 64"][/TD]
[TD="width: 64"]JAN[/TD]
[TD="width: 64"]FEB[/TD]
[/TR]
[TR]
[TD]BINS[/TD]
[TD][/TD]
[TD="align: right"]5550[/TD]
[TD="align: right"]2500[/TD]
[/TR]
[TR]
[TD]PARTS[/TD]
[TD][/TD]
[TD="align: right"]1200[/TD]
[TD="align: right"]550[/TD]
[/TR]
[TR]
[TD]MISC[/TD]
[TD][/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]150[/TD]
[/TR]
</tbody>[/TABLE]
Code:
=SUMIFS('2019'!L:L,'2019'!E:E,A2,'2019'!A:A,$C$1)
=SUMIFS('2019'!L:L,'2019'!E:E,A2,'2019'!A:A,$D$1)
There would be a slightly different formula for each month (the last criteria $C$1 for January and $D$1 for February, etc.), and the formulas can be copied down for to cover the categories.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

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