Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default personal numberformat

hi
i have some problem, wheni use a code from excel 97 to excel 2000

what i want is when a cells contains "0,00" i want it shows " -
i have a personal format like == Selection.NumberFormat = "#.00##;-#.00##;- ;
this format work well in excel97 but not in excel 2000
it doesn't display data!! (excel 2000), it hides all data

it works in this = Selection.NumberFormat = "#.00##;-#.00##;

can u give my a hand, please thank

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default personal numberformat

It works for me in MacXLv.X, and it should work in XL00. Do you have the
Tools/Options/View/zero values checkbox checked?

In article ,
"khennet" wrote:

hi,
i have some problem, wheni use a code from excel 97 to excel 2000.

what i want is when a cells contains "0,00" i want it shows " - "
i have a personal format like == Selection.NumberFormat = "#.00##;-#.00##;-
;"
this format work well in excel97 but not in excel 2000.
it doesn't display data!! (excel 2000), it hides all data.

it works in this = Selection.NumberFormat = "#.00##;-#.00##;"

can u give my a hand, please thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default personal numberformat

This worked in xl2002:

#.00##;-#.00##;- ;@

When I did it manually.

So ....

Selection.NumberFormat = "#.00##;-#.00##;- ;@"

Should work ok in code?????



khennet wrote:

hi,
i have some problem, wheni use a code from excel 97 to excel 2000.

what i want is when a cells contains "0,00" i want it shows " - "
i have a personal format like == Selection.NumberFormat = "#.00##;-#.00##;- ;"
this format work well in excel97 but not in excel 2000.
it doesn't display data!! (excel 2000), it hides all data.

it works in this = Selection.NumberFormat = "#.00##;-#.00##;"

can u give my a hand, please thanks


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default personal numberformat

It hid text values for me. (I think that's what data meant to the OP.)



JE McGimpsey wrote:

It works for me in MacXLv.X, and it should work in XL00. Do you have the
Tools/Options/View/zero values checkbox checked?

In article ,
"khennet" wrote:

hi,
i have some problem, wheni use a code from excel 97 to excel 2000.

what i want is when a cells contains "0,00" i want it shows " - "
i have a personal format like == Selection.NumberFormat = "#.00##;-#.00##;-
;"
this format work well in excel97 but not in excel 2000.
it doesn't display data!! (excel 2000), it hides all data.

it works in this = Selection.NumberFormat = "#.00##;-#.00##;"

can u give my a hand, please thanks


--

Dave Peterson

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default personal numberformat

didn't work manually neither in code


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default personal numberformat

That's odd.

I just booted up xl2k and it worked both manually and as a macro for me.

What was the code you used?



khennet wrote:

didn't work manually neither in code


--

Dave Peterson

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default personal numberformat

i used
Selection.NumberFormat = "#.00##;-#.00##;- ;@
Selection.HorizontalAlignment = xlRigh
Selection.VerticalAlignment = xlCente
instead o

Selection.NumberFormat = "#.00##;-#.00##; -
Selection.HorizontalAlignment = xlRigh
Selection.VerticalAlignment = xlCente

and excel didn't show me " - " when data is 0.00 but "0.00"!!

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default personal numberformat

sorry,
your solution is right
it's only cells is in string format and NUMBERFORMAT didn't recognize "0.00" as 0 numeric
i change format in this wa
dim toto as variant
toto ="0,00
cells = tot
to cells = cdbl(toto

and now it works wel

THX everybody for help
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default personal numberformat

Glad you found it. (Those text numbers are pesky!)

khennet wrote:

sorry,
your solution is right.
it's only cells is in string format and NUMBERFORMAT didn't recognize "0.00" as 0 numeric.
i change format in this way
dim toto as variant
toto ="0,00"
cells = toto
to cells = cdbl(toto)

and now it works well

THX everybody for help


--

Dave Peterson

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 Q Aaron Excel Worksheet Functions 4 December 18th 09 02:15 AM
NumberFormat danpt Excel Discussion (Misc queries) 3 May 20th 09 10:55 PM
numberformat? Jack Sons Excel Discussion (Misc queries) 3 September 4th 07 03:44 PM
NumberFormat? alex Excel Worksheet Functions 3 March 1st 07 09:12 PM
Numberformat Syrus the Virus[_13_] Excel Programming 6 February 12th 04 02:12 PM


All times are GMT +1. The time now is 02:32 AM.

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

About Us

"It's about Microsoft Excel"