Combine and Sum Lookups across multiple rows using an array formula

pkh

New Member
Joined
Nov 23, 2011
Messages
21
Hi, I need to convert several currencies across multiple rows into GBP by looking up a conversion table and then provide the sum in GBP. I haven't been able to come up with an elegant formula (an array type formula maybe) to keep it short and simple.
1590645118088.png


for the SUM in GBP, I've got the following formula:
SUM(C8/INDEX($C$2:$C$4,MATCH(B8,$B$2:$B$4,0),),C9/INDEX($C$2:$C$4,MATCH(B9,$B$2:$B$4,0),),C10/INDEX($C$2:$C$4,MATCH(B10,$B$2:$B$4,0),))

But this is not practical as the actual table of items has a lot more rows. Any help would be much appreciated.

Regards,
pkh
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
See if this works

=SUMPRODUCT($C$8:$C$10/INDEX($C$2:$C$4,MATCH(T(IF({1},$B$8:$B$10)),$B$2:$B$4,0)))
 
Upvote 0
Try below formula:

=SUMPRODUCT(SUMIFS(C8:C10,B8:B10,B2:B4)/C2:C4)


Regards,
Amit Tandon
 
Last edited by a moderator:
Upvote 0
Amit,

Thanks for this. Also very elegant. Much appreciated.

Regards,
pkh
A
Try below formula:

=SUMPRODUCT(SUMIFS(C8:C10,B8:B10,B2:B4)/C2:C4)


Regards,
Amit Tandon
www.excelanytime.com
Amit,

Actually this worked even better because i could extend the formula to a blank row below without getting #NA errors, which I could not avoid in the index match approach without specifying a blank row in the lookup array. I don't like using ISNA as it can hide other errors.

Thanks,
pkh
 
Upvote 0

Forum statistics

Threads
1,214,391
Messages
6,119,244
Members
448,879
Latest member
VanGirl

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