I have English version of Excel and Polish regional settings. I try to make a code which will give cells formatting with pound symbol before number value.
Unfortunately it is converted to "L" when I paste the symbol to VBA window. Macro recorder also records cells formatted this way as "L". Chr(163) returns "Ł".
Changing system language setting, localization settings or keyboard settings had no effect. Only after changing regional settings (requires PC restart) to English (Great Britain) it works correctly. Is there any way I could use this symbol without changing regional settings?
If you want to apply the symbol to the formatting via VBA, try:
Sub Serling()
Const g = "General"
dq = Chr(34)
sterl = " " & ChrW(163)
s = g & dq & sterl & dq
Selection.NumberFormat = s
Selection.Font.Name = "Arial Unicode MS"
End Sub
EDIT#1:
To me, this is really cool. If you want degrees Celsius, use ChrW(8451): if you want degrees Fahrenheit, use ChrW(8457), etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With