Combine Index Match Sumproduct

*shudder*

Well-known Member
Joined
Aug 20, 2009
Messages
510
Office Version
  1. 2016
Platform
  1. Windows
Hi Guys,

I am looking to sum some data based on criteria in two columns and a row header. Example of data layout as below.

DateCustomerProduct 1Product 2Product 3Product 4
01/01/2020​
A
100​
1000​
2000​
3000​
01/01/2021​
A
100​
1000​
2000​
3000​
01/01/2022​
A
100​
1000​
2000​
3000​
01/01/2022​
A
200​
1000​
2000​
3000​
01/01/2020​
B
100​
1000​
2000​
3000​
01/01/2021​
B
100​
1000​
2000​
3000​
01/01/2022​
B
100​
1000​
2000​
3000​
01/01/2020​
C
100​
1000​
2000​
3000​
01/01/2021​
C
100​
1000​
2000​
3000​
01/01/2022​
C
100​
1000​
2000​
3000​

This is the result I am looking for:

Date:01/01/2022
Customer:A
Product:Product 1
Result300

This is the index/ match formula I currently have which only returns 200 rather than suming 100+200:

{=INDEX(Table1[[Product 1]:[Product 4]],MATCH(B15,IF(Table1[Customer]=B16,Table1[Date]),1),MATCH(B17,Table1[[#Headers],[Product 1]:[Product 4]],0))}

Thanks in advance.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
try this

Book1
ABCDEF
1DateCustomerProduct 1Product 2Product 3Product 4
201/01/2020A100100020003000
301/01/2021A100100020003000
401/01/2022A100100020003000
501/01/2022A200100020003000
601/01/2020B100100020003000
701/01/2021B100100020003000
801/01/2022B100100020003000
901/01/2020C100100020003000
1001/01/2021C100100020003000
1101/01/2022C100100020003000
12
13This is the result I am looking for:
14
15Date:01/01/2022
16Customer:A
17Product:Product 1
18Result300
288
Cell Formulas
RangeFormula
B18B18=SUMPRODUCT((B17=C1:F1)*(A2:A11=B15)*(B16=B2:B11),C2:F11)
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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