Need to convert value depending on currency and date

Ascensus

New Member
Joined
Feb 22, 2024
Messages
1
Office Version
  1. 2021
Platform
  1. Windows
I need a formula that will identify what exchange rate to use to convert E2 in to F2. The parameters are a date the B2 relates to and the currency in A2. The currencies are CHF, EUR & USD.
The first table is the data and I need to work out the value in the F1. The second table is a extract from the currency table that I want to look up to. There is a table for each currency.

I have tried a vlookup with multiple criteria but haven't had much success.

ABCDEF
1CurrencyYearPurchase DateProduct CodeCurr PriceGBP Price
2GBP200001/05/2000CH000437.00
3CHF201629/03/2016CH00053.05
4USD202404/08/2024CH000672.00
5EUR202306/09/2023CH00071.50
6GBP200901/12/2009CH00082.46


ABC
1Curr.DateRate
2USD20080.5445730
3USD20090.6411690
4USD20100.6474910
5USD20110.6236290
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
This can be achieved, but it will be necessary for your sample data to be complete for all currency conversions and years for us to provide you with a solution.
 
Upvote 0
I'm not sure I understand it correctly. However, if I do, what I would do is convert the currency tables to excel Tables and name them as their currency code (e.g., GBP, USD, EUR, CHF). You can also drop Column A then for each Currency, as there is no need for them any longer.

Then just do this in column F (assuming your main data table is also a Named Table):

VBA Code:
=XLOOKUP([@Year], INDIRECT([@Currency]&"[Date]"), INDIRECT([@Currency]&"[Rate]") , , -1) * [@[Curr Price]]
 
Upvote 0

Forum statistics

Threads
1,215,096
Messages
6,123,074
Members
449,094
Latest member
mystic19

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