Color a calculated percentage cell text red if results negative

J

John

I have a spread sheet containing columns Budget, Expense, Variance and %
Variance in cols A, B, C and D. Col D contains formulas of the form =C10/A10.

What code would I add to color negative percentage cell text red?

Thx for your help, John
 
E

Eric

Highlight appropriate cells; Format-conditional formatting-"Cell Value Is"
"less than" "0", then hit the format button and format appropriately.
 
M

MyVeryOwnSelf

I have a spread sheet containing columns Budget, Expense, Variance and
% Variance in cols A, B, C and D. Col D contains formulas of the form
=C10/A10.

What code would I add to color negative percentage cell text red?

One way:
Format > Cells > Number > Custom

and under "Type" put
0.00%;[Red]0.00%

Vary to suit.

(I have Excel 2003.)
 
M

MyVeryOwnSelf

I have a spread sheet containing columns Budget, Expense, Variance and
% Variance in cols A, B, C and D. Col D contains formulas of the form
=C10/A10.

What code would I add to color negative percentage cell text red?

One way:
Format > Cells > Number > Custom

and under "Type" put
0.00%;[Red]0.00%

Or even better:
0.00%;[Red]-0.00%
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top