![]() |
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! |
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! |
All times are GMT +1. The time now is 05:39 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com