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