Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 99
Default VBA NumberFormat problem

Hi,
I use Excel 2000 french version with Windows XP Pro.
When I use this:
Selection.NumberFormat = _
"* # ##0.00\ ;[Red] * (# ##0.00);""- """
The numbers 999 999 do not display the space (separator for the thousands
in French).
When I use this:
Selection.NumberFormat = _
"* # ### ##0.00\ ;[Red] * (# ### ##0.00);""- """
The numbers < 1 000 display a space before the opening parenthese (which is
not acceptable).
Another thing: I would like the numbers 999 999 999,99 to display as "###
### ### ##0,00" but how many # should one use to satisfy Excel (for negative
number as well)?
Note: in French, the decimal point is a comma.
Thanks.
--
Jac Tremblay
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default VBA NumberFormat problem

Try this:

Selection.NumberFormatLocal = _
"* # ##0,00\ ;[Red] * (# ##0,00);""- """


--
Jim
"Jac Tremblay" wrote in message
...
| Hi,
| I use Excel 2000 french version with Windows XP Pro.
| When I use this:
| Selection.NumberFormat = _
| "* # ##0.00\ ;[Red] * (# ##0.00);""- """
| The numbers 999 999 do not display the space (separator for the
thousands
| in French).
| When I use this:
| Selection.NumberFormat = _
| "* # ### ##0.00\ ;[Red] * (# ### ##0.00);""- """
| The numbers < 1 000 display a space before the opening parenthese (which
is
| not acceptable).
| Another thing: I would like the numbers 999 999 999,99 to display as
"###
| ### ### ##0,00" but how many # should one use to satisfy Excel (for
negative
| number as well)?
| Note: in French, the decimal point is a comma.
| Thanks.
| --
| Jac Tremblay

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,393
Default VBA NumberFormat problem

Jim this gives me results such as 1,2 34,567
There is a space between 2 and 3 but commas are still used for thousands
separators
There are no decimal places
best wishes
--
Bernard
"Jim Rech" wrote in message
...
Try this:

Selection.NumberFormatLocal = _
"* # ##0,00\ ;[Red] * (# ##0,00);""- """


--
Jim
"Jac Tremblay" wrote in message
...
| Hi,
| I use Excel 2000 french version with Windows XP Pro.
| When I use this:
| Selection.NumberFormat = _
| "* # ##0.00\ ;[Red] * (# ##0.00);""- """
| The numbers 999 999 do not display the space (separator for the
thousands
| in French).
| When I use this:
| Selection.NumberFormat = _
| "* # ### ##0.00\ ;[Red] * (# ### ##0.00);""- """
| The numbers < 1 000 display a space before the opening parenthese (which
is
| not acceptable).
| Another thing: I would like the numbers 999 999 999,99 to display as
"###
| ### ### ##0,00" but how many # should one use to satisfy Excel (for
negative
| number as well)?
| Note: in French, the decimal point is a comma.
| Thanks.
| --
| Jac Tremblay



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default VBA NumberFormat problem

This worked great for me with French settings of course. So strange it
wouldn't for you.<g

--
Jim
"Bernard Liengme" wrote in message
...
| Jim this gives me results such as 1,2 34,567
| There is a space between 2 and 3 but commas are still used for thousands
| separators
| There are no decimal places
| best wishes
| --
| Bernard
| "Jim Rech" wrote in message
| ...
| Try this:
|
| Selection.NumberFormatLocal = _
| "* # ##0,00\ ;[Red] * (# ##0,00);""- """
|
|
| --
| Jim
| "Jac Tremblay" wrote in message
| ...
| | Hi,
| | I use Excel 2000 french version with Windows XP Pro.
| | When I use this:
| | Selection.NumberFormat = _
| | "* # ##0.00\ ;[Red] * (# ##0.00);""- """
| | The numbers 999 999 do not display the space (separator for the
| thousands
| | in French).
| | When I use this:
| | Selection.NumberFormat = _
| | "* # ### ##0.00\ ;[Red] * (# ### ##0.00);""- """
| | The numbers < 1 000 display a space before the opening parenthese
(which
| is
| | not acceptable).
| | Another thing: I would like the numbers 999 999 999,99 to display as
| "###
| | ### ### ##0,00" but how many # should one use to satisfy Excel (for
| negative
| | number as well)?
| | Note: in French, the decimal point is a comma.
| | Thanks.
| | --
| | Jac Tremblay
|
|
|

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 99
Default VBA NumberFormat problem

Hi Jim,
It does work perfectly. I guess the NumberFormatLocal uses the local
settings from the control panel.
I am now at home with Excel 2007 English with Windows XP Pro French. I will
try it tomorrow at the office where Excel 2000 is still in the portrait.
Thank you for your reply. It makes my day.
--
Jac Tremblay


"Jim Rech" wrote:

Try this:

Selection.NumberFormatLocal = _
"* # ##0,00\ ;[Red] * (# ##0,00);""- """


--
Jim
"Jac Tremblay" wrote in message
...
| Hi,
| I use Excel 2000 french version with Windows XP Pro.
| When I use this:
| Selection.NumberFormat = _
| "* # ##0.00\ ;[Red] * (# ##0.00);""- """
| The numbers 999 999 do not display the space (separator for the
thousands
| in French).
| When I use this:
| Selection.NumberFormat = _
| "* # ### ##0.00\ ;[Red] * (# ### ##0.00);""- """
| The numbers < 1 000 display a space before the opening parenthese (which
is
| not acceptable).
| Another thing: I would like the numbers 999 999 999,99 to display as
"###
| ### ### ##0,00" but how many # should one use to satisfy Excel (for
negative
| number as well)?
| Note: in French, the decimal point is a comma.
| Thanks.
| --
| Jac Tremblay




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 99
Default VBA NumberFormat problem

Hi Bernard,
Try to change your local settings in the control panel. Make sure you have
this for the number format:
123 456 789,00
Wish you the best.
--
Jac Tremblay


"Bernard Liengme" wrote:

Jim this gives me results such as 1,2 34,567
There is a space between 2 and 3 but commas are still used for thousands
separators
There are no decimal places
best wishes
--
Bernard
"Jim Rech" wrote in message
...
Try this:

Selection.NumberFormatLocal = _
"* # ##0,00\ ;[Red] * (# ##0,00);""- """


--
Jim
"Jac Tremblay" wrote in message
...
| Hi,
| I use Excel 2000 french version with Windows XP Pro.
| When I use this:
| Selection.NumberFormat = _
| "* # ##0.00\ ;[Red] * (# ##0.00);""- """
| The numbers 999 999 do not display the space (separator for the
thousands
| in French).
| When I use this:
| Selection.NumberFormat = _
| "* # ### ##0.00\ ;[Red] * (# ### ##0.00);""- """
| The numbers < 1 000 display a space before the opening parenthese (which
is
| not acceptable).
| Another thing: I would like the numbers 999 999 999,99 to display as
"###
| ### ### ##0,00" but how many # should one use to satisfy Excel (for
negative
| number as well)?
| Note: in French, the decimal point is a comma.
| Thanks.
| --
| Jac Tremblay




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
NumberFormat danpt Excel Discussion (Misc queries) 3 May 20th 09 10:55 PM
NumberFormat? alex Excel Worksheet Functions 3 March 1st 07 09:12 PM
Repost: NumberFormat/Autofilter/Rounding Problem Mark Driscol[_2_] Excel Programming 3 February 22nd 06 03:25 PM
NumberFormat/Autofilter/Rounding Problem [email protected] Excel Programming 0 February 21st 06 09:03 PM
Numberformat Syrus the Virus[_13_] Excel Programming 6 February 12th 04 02:12 PM


All times are GMT +1. The time now is 04:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"