I have a workbook where I'd like to change the currencies between USD & Euro (and back again) easily.
I have a code (below) to change the format, from $ to € however, it doesn't change the value. Changing $100 to €100 is wrong as the initial value should take into account an exchange rate. So, I'd like $100 to change to €94 depending on the exchange rate that I enter into a specific cell.
Here is the code I'm using to change the format:
Sub CurrencyFormat()
Dim theSheet As Worksheet
For Each theSheet In ActiveWorkbook.Sheets
Application.FindFormat.NumberFormat = "[$$-en-US]#,##0"
Application.ReplaceFormat.NumberFormat = "[$€-de-AT] #,##0"
theSheet.Cells.Replace What:="", Replacement:="", LookAt:=xlPart, SearchOrder _
:=xlByRows, MatchCase:=False, SearchFormat:=True, ReplaceFormat:=True
Next
End Sub
Any help would be greatly appreciated!
I have a code (below) to change the format, from $ to € however, it doesn't change the value. Changing $100 to €100 is wrong as the initial value should take into account an exchange rate. So, I'd like $100 to change to €94 depending on the exchange rate that I enter into a specific cell.
Here is the code I'm using to change the format:
Sub CurrencyFormat()
Dim theSheet As Worksheet
For Each theSheet In ActiveWorkbook.Sheets
Application.FindFormat.NumberFormat = "[$$-en-US]#,##0"
Application.ReplaceFormat.NumberFormat = "[$€-de-AT] #,##0"
theSheet.Cells.Replace What:="", Replacement:="", LookAt:=xlPart, SearchOrder _
:=xlByRows, MatchCase:=False, SearchFormat:=True, ReplaceFormat:=True
Next
End Sub
Any help would be greatly appreciated!