SUMPRODUCT of two arrays but not necessarily in the same order (Index/match/IFs?)

magemaester

New Member
Joined
Dec 17, 2017
Messages
10
Hi guys,

I want to obtain the sumproduct of the following two arrays, essentially 1 x 0.2 + 2 x 0.1 + 3 x 0.3.

A 1
B 2
C 3

B 0.1
A 0.2
C 0.3

SUMPRODUCT would work neatly if the first column in both these arrays were identically ordered (i.e. ABC and ABC). But because they're not so, it doesn't work. The actual spreadsheet I'm manipulating has hundreds of rows where the two arrays are not identically ordered. I've tried searching for solutions on similar topics but I haven't been able to find a solution thus far. Is anyone able to help? I have a feeling that it isn't as simple as it looks and it might required nested IFs and index matches.

Many thanks!
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Welcome to Mr Excel forum

Maybe something like this


A
B
C
D
E
F
G
1
Code​
Value​
Code​
Value​
Result​
2
A​
1​
B​
0,1​
1,3​
3
B​
2​
A​
0,2​
4
C​
3​
C​
0,3​

Formula in G2
=SUMPRODUCT(B2:B4,SUMIF(D2:D4,A2:A4,E2:E4))

Hope this helps

M.
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,733
Members
448,987
Latest member
marion_davis

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