Formatting Font colour depending on value

Rexy69

New Member
Joined
Apr 28, 2015
Messages
16
Hi i'm sure this is really simple but i can't work it out
i was positive numbers with a (+) and to be coloured green and negative numbers with a (-) and be red but i was 0 to stay black

here is what i have so far for the formatting of the cells

: [Green]+£#,##0.00;[Red]-£#,##0.00

this works apart from £0.00 goes green also , is there something i can add to the above to make £0.00 stay black??

Thanks

Rexy~
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Hi

Run the macro, cause translation problems I did not find the required colors


Code:
    Range("B1").Select
    Selection.NumberFormat = _
        "[Blue][>0]+£#,##0.00;[Red][<0]-£#,##0.00;£#,##0.00;@"
    Range("C1").Select
    Selection.NumberFormat = _
        "[Blue][>0]+£ * #,##0.00;[Red][<0]-£ * #,##0.00;£ * #,##0.00;@"
 
Upvote 0
Thanks that worked , it also helped me workout how to do it in the cell format

if anyone wants to know its : (Color 10) is a darker green, the [green] is too bright.

[Color10]+£#,##0.00;[Red]-£#,##0.00;[Black]£#,##0.00

Thanks

Rexy~
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top