Sumif with Index Match w/multiple criteria

erniepoe

Active Member
Joined
Oct 23, 2006
Messages
375
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I've got the following formula combining an index match with a sumif, but it's returning the wrong result. The goal is to sum all the values that equal what is in C8 that match column A on the Niagara Summary page, and then sum the values based on the index match criteria below.

The index match formula is working correctly in that it will return the first value when the sumif portion is removed, so i'm guessing the error lies within the sumif syntax.

Any ideas? Thanks so much for all your help.

Best,
Ernie



=IFERROR(SUMIF('[2019 Forecast - April v2.xlsx]Niagara Summary (CAD)'!$A:$A,$C8,INDEX('[2019 Forecast - April v2.xlsx]Niagara Summary (CAD)'!$C:$GZ,MATCH($C8,'[2019 Forecast - April v2.xlsx]Niagara Summary (CAD)'!$A:$A,0),MATCH(D$3&D$4,'[2019 Forecast - April v2.xlsx]Niagara Summary (CAD)'!$C$4:$GZ$4&'[2019 Forecast - April v2.xlsx]Niagara Summary (CAD)'!$C$5:$GZ$5,0))),0)
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Are you looking for something like the following:

Basically, conditionally sum on the Product, but only based on one month?

ABCDEFG
2ProductJanuaryFebruaryMarchAprilMayJune
3B215215432390123522422535
4B8769217989219551044
5A1222890250193211342876
6A93411971443109010141389
7B10111290150396714091733
8B75699213218718551477
9
10
11ProductMonthTotal Sales for Month
12BMarch6012

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet3

Worksheet Formulas
CellFormula
C12=IFERROR(SUMPRODUCT(($A$3:$A$8=A12)*(INDEX($B$3:$G$8,,MATCH(B12,$B$2:$G$2,0)))),"")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,583
Messages
6,120,383
Members
448,956
Latest member
JPav

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