Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Put 20 in range B2 and then try this in the immediate window:
ActiveSheet.range("B2").NumberFormat = "$#,##0.00_ ;[Red]-$#,##0.00" Why does it go to sterling?!! Regards Jason. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Mon, 22 Jun 2009 08:44:11 -0700 (PDT), WhytheQ
wrote: Put 20 in range B2 and then try this in the immediate window: ActiveSheet.range("B2").NumberFormat = "$#,##0.00_ ;[Red]-$#,##0.00" Why does it go to sterling?!! Regards Jason. I guess the $ character has some special meaning in this context. It seems it is the way of inserting the currency that is currently set in the user preferences. And that may be dollars or may not be dollars. If you change your command to the following: ActiveSheet.range("B2").NumberFormat = "\$#,##0.00_ ;[Red]-\$#,##0.00" i.e. with a \ character just before the $ character (in two places), the result becomes what you expect. Hope this helps / Lars-Åke |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Strange | Excel Worksheet Functions | |||
Need Help: Strange, Strange Behavior ( Not Me. My Model! ) | Excel Programming | |||
strange... | Excel Programming | |||
Very-2 strange | Excel Discussion (Misc queries) | |||
2 strange ones.. | Excel Programming |