Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
UPPER case in a macro
Hello there
I need to UPPER CASE the result (CurrencyCode) at the end my macro. Any idea how please? Daniel Sub Get_Code_for_Conversion() Dim Currency1 As Variant Dim Currency2 As Variant Dim CurrencyCode As Variant For i = 2 To Last_Row(Sheets("Stocks").Columns("A:A")) + 1 Currency1 = Sheets("Characteristics").Range("G" & i) Currency2 = Sheets("Characteristics").Range("H" & i) If Sheets("Characteristics").Range("G" & i) < Sheets("Characteristics").Range("H" & i) Then CurrencyCode = Currency1 & Currency2 Else CurrencyCode = "" Sheets("Characteristics").Range("N" & i) = CurrencyCode CurrencyCode will come as GbpEur for instance and I need it to be outputed as GBPEUR I am thus looking to the equivalent of UPPER function in the worksheet but did not find it Help welcome! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
UPPER case in a macro
Excellent thats perfect!
many thanks Daniel John Bundy remove wrote: Ucase(yourstring) is how you do it programatically -- -John Northwest11 Please rate when your question is answered to help us and others know what is helpful. " wrote: Hello there I need to UPPER CASE the result (CurrencyCode) at the end my macro. Any idea how please? Daniel Sub Get_Code_for_Conversion() Dim Currency1 As Variant Dim Currency2 As Variant Dim CurrencyCode As Variant For i = 2 To Last_Row(Sheets("Stocks").Columns("A:A")) + 1 Currency1 = Sheets("Characteristics").Range("G" & i) Currency2 = Sheets("Characteristics").Range("H" & i) If Sheets("Characteristics").Range("G" & i) < Sheets("Characteristics").Range("H" & i) Then CurrencyCode = Currency1 & Currency2 Else CurrencyCode = "" Sheets("Characteristics").Range("N" & i) = CurrencyCode CurrencyCode will come as GbpEur for instance and I need it to be outputed as GBPEUR I am thus looking to the equivalent of UPPER function in the worksheet but did not find it Help welcome! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
convert lower to upper case automatically without using UPPER | Excel Discussion (Misc queries) | |||
Changing upper case characters to upper/lower | Excel Discussion (Misc queries) | |||
Changing file in all upper case to upper and lower case | Excel Discussion (Misc queries) | |||
How do I convert all upper case excel sheet into upper and lower . | Excel Discussion (Misc queries) | |||
UPPER CASE macro shortcut key anomaly | Excel Programming |