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

Hi,

Selection.NumberFormat = "[Green]#,##0_ ;[Blue]0,##0_;[Red]-#,##0 "

I tried to make a numberformat which gives:

green when positive
blue when zero
red when negative

Help me, please!

Tnxs in advanc

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Numberformat

Syrus,

Try this

"_-[Green]#,##0_-;_-[Blue]#,##0_-;_-[Red]-#,##0_-"

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Syrus the Virus " wrote in
message ...
Hi,

Selection.NumberFormat = "[Green]#,##0_ ;[Blue]0,##0_;[Red]-#,##0 "

I tried to make a numberformat which gives:

green when positive
blue when zero
red when negative

Help me, please!

Tnxs in advance


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Numberformat

What I usually do before posting a reply...... i test my
anwser.............................. I'd like to say thanks
but............. I can't it doesn't work!!


---
Message posted from http://www.ExcelForum.com/

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Numberformat

Try this

"[Green]#,##0;[Blue]-#,##0;[Red]0"

I assume you want a negative sign in front of a negative number rather than
zero. Also, for zero #,##0 is kind of meaningless.

--
Regards,
Tom Ogilvy


"Syrus the Virus " wrote in
message ...
Hi,

Selection.NumberFormat = "[Green]#,##0_ ;[Blue]0,##0_;[Red]-#,##0 "

I tried to make a numberformat which gives:

green when positive
blue when zero
red when negative

Help me, please!

Tnxs in advance


---
Message posted from http://www.ExcelForum.com/



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

I couldn't get the Number format to work if a number was
zero either.

But you could try the Conditional Formatting instead -
that works.

If you need to do teh format for a whole range, then
highlight the range before you select conditional
formatting.

HTH
-----Original Message-----
Hi,

Selection.NumberFormat = "[Green]#,##0_ ;[Blue]0,##0_;

[Red]-#,##0 "

I tried to make a numberformat which gives:

green when positive
blue when zero
red when negative

Help me, please!

Tnxs in advance


---
Message posted from http://www.ExcelForum.com/

.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Numberformat

Now there is an anwser I need. Damn I went out last night and can'
think straight ........ looking back on the problem........ i knew th
awnse

--
Message posted from http://www.ExcelForum.com

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Numberformat

Well you are one f**rI won't bother trying to help again after a comment
like that.

Bob

"Syrus the Virus " wrote in
message ...
What I usually do before posting a reply...... i test my
anwser.............................. I'd like to say thanks
but............. I can't it doesn't work!!


---
Message posted from http://www.ExcelForum.com/



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
using cells.numberformat maxzsim Excel Worksheet Functions 2 May 6th 05 10:41 AM


All times are GMT +1. The time now is 12:38 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"