Uller
03-20-2009, 12:57 PM
Hey guys,
I'm still fairly new to VBA, and I am having some issues with the following: I am trying to design a macro that will convert inputted fx values to USD when the user enters the conversion number.
I need a new column to the left of the "Country Code" column with the converted values calculated for each total in the "Summation" column (it is just multiplying the summation column values by the inputted number). Here is the code that I have so far that finds the country currency and prompts the user to enter a conversion rate (for this case AUD into USD).
Sub CurrencyFX()
'Cells.Find(What:="Customer Currency", After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(1, 0).Select
If Selection <> "USD" Then
ActiveCell.EntireColumn.Insert
UserVal = Application.InputBox(Prompt:="Currency conversion factor?", Type:=1)
End If
I have attached the file, please let me know if you have any suggestions! I would greatly appreciate it!
Regards,
Uller
I'm still fairly new to VBA, and I am having some issues with the following: I am trying to design a macro that will convert inputted fx values to USD when the user enters the conversion number.
I need a new column to the left of the "Country Code" column with the converted values calculated for each total in the "Summation" column (it is just multiplying the summation column values by the inputted number). Here is the code that I have so far that finds the country currency and prompts the user to enter a conversion rate (for this case AUD into USD).
Sub CurrencyFX()
'Cells.Find(What:="Customer Currency", After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(1, 0).Select
If Selection <> "USD" Then
ActiveCell.EntireColumn.Insert
UserVal = Application.InputBox(Prompt:="Currency conversion factor?", Type:=1)
End If
I have attached the file, please let me know if you have any suggestions! I would greatly appreciate it!
Regards,
Uller