Country / Currency conversion

2022

Board Regular
Joined
Jun 5, 2022
Messages
74
Office Version
  1. 2016
Platform
  1. Windows
Hi, I need to make the currency in a cell dependent on the country a user has selected.

It's possible to do that using an IF statement, with a handful of countries. However, there's a limit on the number conditions an IF statement can take.

Is there a way to do this, for all countries, using an alternative method or even using VBA?

For context, let's say that cell C2 was a data-validated cell that was based on a list of cells in H2:H100, and H2:H100 had a list of countries.

So if H2 had "USA" in it,
and H3 had "France" in it,

a user would be able to select "USA" from the drop-down in cell C2, and then the US Dollar (in Excel format) would appear in cell D2.


If they selected "France" in cell C2, then the Euro (in Excel format) would appear.

Has anyone done this before?

Thanks in advance.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
You could make dozens of Conditional Formatting rules. It wouldn't be as many as you'd think since many countries use a dollar sign and many use a Euro, etc.
 
Upvote 0
Thank you for your response.

Yes, I'd seen the conditonal formatting option.

But I was wondering if there's a quicker way - I have nearly 200 countries to create rules for!
 
Upvote 0
ut I was wondering if there's a quicker way - I have nearly 200 countries to create rules for!
But as Don alluded to, you won't actually need to create 200 rules.
So, all the countries that use the "$" could probably be one rule.
All all the countries that use the Euro sign could use another rule.
etc.
 
Upvote 0
It sounds like you may be looking for a lookup table:

Book1
ABCDEFGH
1CountryCurrencyCountryCurrency
2FranceEuroUSAUSD
3EnglandPound
4FranceEuro
5JapanYen
6ItalyEuro
7
Sheet1
Cell Formulas
RangeFormula
D2D2=VLOOKUP(C2,G2:H10,2,0)
 
Upvote 0
Eric,

I could be totally wrong, but I think that Don and I were under the impression that they wanted to apply a Currency Format to the cell, and not return a text value.
That being said, my thought was to still use a VLOOKUP table to list all the countries and currencies, and then create a Conditional Formatting Rule that does the VLOOKUP and formats based on the value in the Currency column (i.e. if Dollar format with "$", etc).
 
Upvote 0
Eric,

I could be totally wrong, but I think that Don and I were under the impression that they wanted to apply a Currency Format to the cell, and not return a text value.
That being said, my thought was to still use a VLOOKUP table to list all the countries and currencies, and then create a Conditional Formatting Rule that does the VLOOKUP and formats based on the value in the Currency column (i.e. if Dollar format with "$", etc).
You may be right about the format, but I wasn't positive so I gave the other option. Using a table to choose the format would work well. I was also thinking we could add another column to hold the conversion factor, so if they choose 2 countries and an amount, it could do the conversion too.
 
Upvote 0
Eric,

I could be totally wrong, but I think that Don and I were under the impression that they wanted to apply a Currency Format to the cell, and not return a text value.
That being said, my thought was to still use a VLOOKUP table to list all the countries and currencies, and then create a Conditional Formatting Rule that does the VLOOKUP and formats based on the value in the Currency column (i.e. if Dollar format with "$", etc).
You were right in assuming that I wanted to format the cells to the currency chosen.

Eric's suggested solution is good, too. I'll look into both. Thank you.
 
Upvote 0

Forum statistics

Threads
1,223,247
Messages
6,171,004
Members
452,374
Latest member
keccles

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