Embedded Vlookup for values within Date Range --- Help!

Mgess

New Member
Joined
Sep 10, 2015
Messages
2
Hello! Please comment if you have an idea about how to do this!

I am trying to convert foreign sales prices dating back 10 years into USD amounts using a vlookup function embedded within an If function (I also tried a Lookup function) to return the appropriate conversion rate from the appropriate year. The one I am using keeps returning incorrect values. I have approximately 10,000 observations, so i really want to automate this.




[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Date[/TD]
[TD]Sales Price[/TD]
[TD]Currency[/TD]
[TD]Currency Conversion[/TD]
[TD]Price (USD)[/TD]
[TD][/TD]
[TD]From[/TD]
[TD]To[/TD]
[TD]USD/HKD[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]4/6/15[/TD]
[TD]106,250[/TD]
[TD]HKD[/TD]
[TD]???[/TD]
[TD]D2*106,250[/TD]
[TD][/TD]
[TD]9/1/14[/TD]
[TD]8/31/15[/TD]
[TD]7.75[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]4/6/15[/TD]
[TD]62,500[/TD]
[TD]HKD[/TD]
[TD]???[/TD]
[TD]D3*62,500[/TD]
[TD][/TD]
[TD]9/1/13[/TD]
[TD]8/31/14[/TD]
[TD]7.73[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]7/16/14[/TD]
[TD]40,000[/TD]
[TD]GBP[/TD]
[TD]???[/TD]
[TD]D4*40,000[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]From[/TD]
[TD]To[/TD]
[TD]USD/GBP[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]9/1/14[/TD]
[TD]8/31/15[/TD]
[TD].649[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]9/1/13[/TD]
[TD]8/31/14[/TD]
[TD].603[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
I was using the following formula (the formula on my actual spreadsheet refers to different cells. This formula refers to my example above):

=If(C2="USD",1,If(C2="HKD",Lookup(A2,G2:H3,I2:I3),If(C2="GBP",Lookup(A2,G6:H7,I6:I7),0)))
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

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