fangfacekitty
Board Regular
- Joined
- Jul 28, 2010
- Messages
- 63
Depending on the 3 digit currency code entered in cell K9 I need to be able to format a range of cells (F18:L25) to reflect the currency used. For currencies such as USD or EUR, where there is a key on the keyboard to use I have no problems. Nor is it a problem for currencies that use western characters such as IDR being Rp.
My problem is where there is a non-western character. Example, the RUB symbol is руб and while I can manually insert it into a cell I can't get the VBA to code the "б" character, it keeps copying as "?". It has a unicode (hex) value of 0431.
How can I get the macro to return the special character? Thanks in advance for any help!
Below is the code I am using:
Select Case Range("K9").Text
Case "EUR"
Range("F18:L25").Select
Selection.NumberFormat = "€# ###"
Case "USD"
Range("F18:L25").Select
Selection.NumberFormat = "$#,###"
Case "IDR"
Range("F18:L25").Select
Selection.NumberFormat = "Rp # ###"
Case "RUB"
Range("F18:L25").Select
Selection.NumberFormat = "py? # ###"
My problem is where there is a non-western character. Example, the RUB symbol is руб and while I can manually insert it into a cell I can't get the VBA to code the "б" character, it keeps copying as "?". It has a unicode (hex) value of 0431.
How can I get the macro to return the special character? Thanks in advance for any help!
Below is the code I am using:
Select Case Range("K9").Text
Case "EUR"
Range("F18:L25").Select
Selection.NumberFormat = "€# ###"
Case "USD"
Range("F18:L25").Select
Selection.NumberFormat = "$#,###"
Case "IDR"
Range("F18:L25").Select
Selection.NumberFormat = "Rp # ###"
Case "RUB"
Range("F18:L25").Select
Selection.NumberFormat = "py? # ###"