Hoping some lovely person can assist me
I need a formula to convert various currencies (Pound, Euro, and Dollar) to Dollar. Please can someone help me?
I have attached an example with an exchange rate table
Thank you
Hoping some lovely person can assist me
I need a formula to convert various currencies (Pound, Euro, and Dollar) to Dollar. Please can someone help me?
I have attached an example with an exchange rate table
Thank you
Last edited by Tally04; 04-20-2021 at 11:58 AM.
In K9
=VLOOKUP(GetCurrency([@Price]),$E$3:$F$5,2,FALSE)*[@Price]
VBA code to extract currency code
![]()
Function GetCurrency(ByVal r As Range) As String Static RegX As Object Application.Volatile If RegX Is Nothing Then Set RegX = CreateObject("VBScript.RegExp") End If With RegX .Global = True .Pattern = "[0-9-.,\s]" GetCurrency = .Replace(r.Text, "") End With End Function
Copy the Excel VBA code
Select the workbook in which you want to store the Excel VBA code
Press Alt+F11 to open the Visual Basic Editor
Choose Insert > Module
Edit > Paste the macro into the module that appeared
Close the VBEditor
Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)
[B][I]
Thanks for the reply. Ive done this, but getting an error message of #name?
See attached
I have this working now. thank you!
You're welcome.
If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks