Sumproduct to remove second stage calculation?

Scotster

Board Regular
Joined
May 29, 2017
Messages
59
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi there, looking for some assistance in how to achieve a result without the added step. I have it in my head I can use Sumproduct but I may be wrong. Any assistance would be appreciated.

Apologies, I'm on a works laptop and I don't have the ability to download/install the plugin or even attach a file. I hope that's OK.

Below is an example of what I'm trying to achieve. Result1 and Result2 values are calculated using simple Sumif formulae:
Code:
=SUMIF($A$3:$A$14,$E3,$B$3:$B$14)
Code:
=SUMIF($D$3:$D$14,$H3,$F$3:$F$14)

I'm looking to achieve the second result without having a requirement for the first result. My attempt was to use an index/match but I don't believe this returns the multiple matches into the array, hence only resulting in the first value rather than the sum:
Code:
=SUMPRODUCT($B$3:$B$14*(($A$3:$A$14=INDEX($E$3:$E$14,MATCH($K3,$D$3:$D$14,0),1))))

Result1Result2SumproductResult Bypass
CodeValuePlantCodeValueResultValueResultValue
AAA5P1AAA5P150P15
AAB10P1AAB10P220P22
AAC15P1AAC15P316P31
AAD20P1AAD20
BBA2P2BBA2
BBB4P2BBB4
BBC6P2BBC6
BBD8P2BBD8
CCA1P3CCA1
CCB3P3CCB3
CCC5P3CCC5
CCD7P3CCD7

I'm no doubt missing something simple so any help appreciated.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Typical, I hit post and then I solve it:

Code:
=SUMPRODUCT($B$3:$B$14*(VLOOKUP($A$3:$A$14,$D$3:$E$14,2,0)=$K3))

Happy if there are any other options though, in case there's a better way :)
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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