Numberformat

  • Thread starter Thread starter Syrus the Virus
  • Start date Start date
S

Syrus the Virus

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
 
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)
 
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!!
 
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.
 
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
 
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
 
Well you are one f**rI won't bother trying to help again after a comment
like that.

Bob
 
Back
Top