sumproduct and vlookup

wujikwan

New Member
Joined
Apr 1, 2012
Messages
2
I have following data and a range named exrate. I like to calculate the USD total value of all products. I can add a column to vlookup the exchange rate against USD and sumproduct the quantity, price, and exchange rate. However, is there a way to do without the extra column by just using sumproduct and say, vlookup? thank you.

colA colB colC colD

product quantity currency price
--------------------------------------------------
Prod01 10,000 AUD 10
Prod02 20,000 AUD 12
Prod03 3,000 CAD 10
Prod04 5,000 EUR 6
....

Total Value in USD: 9999999

EXRATE (range name)
colA colB

Currency Rate
--------------------
AUD 0.83
CAD 0.99
EUR 1.33
....
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hello wujikwan, welcome to MrExcel

One way is to use SUMIF to perform the lookup, e.g. with your first table (data) in A2:D5 and second table (conversion) in F2:G4 try this formula for total value

=SUMPRODUCT(B2:B5,D2:D5,SUMIF(F2:F4,C2:C5,G2:G4))
 
Upvote 0
Thank you Barry, it works.

I didn't realize the sumif function could be used that way. I normally used one single value as criteria in the sumif function. It opens a new page to me. Thank you again.
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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