Sumproduct

Matt_Chelmsford

Board Regular
Joined
Jan 31, 2009
Messages
160
I need a Sumproduct formula that (I think) encompasses an index – match formula.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p> </o:p>
In range A2:A5000 I want to look up whatever S2 Says<o:p></o:p>
In Range B2:B5000 I want to look up whatever S3 says<o:p></o:p>
In Range C2:M2 I want to look up what ever S4 says.<o:p></o:p>
<o:p> </o:p>
In S5 I want to add up all the values that match the above three conditions.<o:p></o:p>
<o:p> </o:p>
So there are 3 criteria of which 2 are vertical and 1 that is horizontal. I have tried playing around with it but my efforts have been hopeless.<o:p></o:p>
<o:p> </o:p>
I would be grateful of any help given. <o:p></o:p>
<o:p> </o:p>
Regards<o:p></o:p>
<o:p> </o:p>
Matthew<o:p></o:p>
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Try:

=SUMPRODUCT(--(A2:A5000=S2),--(B2:B5000=S3),INDEX(C2:M5000,,MATCH(S4,C2:M2)))
 
Upvote 0
=SUMPRODUCT(--(A2:A5000=S2),--(B2:B5000=S3),INDEX(C2:M5000,,MATCH(S4,C2:M2)))

Assuming an exact match for S4 you'll need a third argument of zero in the MATCH function, i.e.

=SUMPRODUCT(--(A2:A5000=S2),--(B2:B5000=S3),INDEX(C2:M5000,0,MATCH(S4,C2:M2,0)))

That assumes that S4 exists only once in C2:M2. This version would accommodate multiple matches for S4 in that range:

=SUMPRODUCT((A3:A5000=S2)*(B3:B5000=S3)*(C2:M2=S4),C3:M5000)
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,292
Members
452,902
Latest member
Knuddeluff

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