Match Index that SUMS multiple criteria

pumpkinyoon

New Member
Joined
Mar 3, 2014
Messages
1
Hello!

I've looked everywhere, but still haven't found the solution! I want to be able to use the match index function to provide the SUM of the results.

Here's what my data looks like, in a simplified form:

My data sheet: (Defined Name is 'StyleExport') **note there are thousands of styles in here, but I want the sum of just 2 of the styles.

WKS:12
STYLE#METRICS:
12345Retail Sales100120
12345Retail Units56
67890Retail Sales300330
67890Retail Units1011

<tbody>
</tbody>

I've defined the names for the cells - Column A: 'Style', Column B: 'Metrics', Row 1: 'Time'

Basically, I want to my formula to return the SUM of retail sales for weeks 1, 2, etc for style #12345 & 67890.

AB
1STYLE:12345
267890
3WK 1WK 2
4RETAIL SALES=MYFORMULA
5UNIT SALES

<tbody>
</tbody>


So currently, my formula is rather LONG:
=INDEX(STYLEEXPORT,MATCH(B1,STYLE,0),MATCH(A3,TIME,0)+INDEX(STYLEEXPORT,MATCH(B2,STYLE,0),MATCH(A3,TIME,0))

Instead of having to manually ADD these index matches, is there something I can do to condense the formula?!

I'm looking for something like INDEX(STYLEEXPORT,MATCH(OR(B1,B2),STYLE,0),MATCH(A3,TIME,0))
But that didn't seem to work! :(

Please let me know!!
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Using your first set of example data this should work:

=SUMPRODUCT((B3:B8="Retail Sales")*((A3:A8=12345)+(A3:A8=67890))*C3:D8)

If you define B3:B8 as Metrics, A3:A8 as Style and C3:D8 as Amount then you could change the above to:

=SUMPRODUCT((Metrics="Retail Sales")*((Style=12345)+(Style=67890))*Amount)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,857
Members
449,051
Latest member
excelquestion515

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