How to change font color based on % variance

diggs2701

New Member
Joined
Jul 23, 2008
Messages
18
Good day (or night) to all,

I have three columns; c represents the actual number; d represents a forecasted number and e represents the variance between both (column d-column c).
If Column E ends up being a negative number or the % is negative((c-d)/d) I want the font in Column E to be green;
If Column E ends up being a % between 0 and 3 (e>0% and e<=3%) then the font should be Yellow;
Last but not least if e>3% I would like the color to be Red. Any ideas? I don't believe conditional formatiing will work. This will go for many rows. Thanks,

Diggs
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Good day (or night) to all,

I have three columns; c represents the actual number; d represents a forecasted number and e represents the variance between both (column d-column c).
If Column E ends up being a negative number or the % is negative((c-d)/d) I want the font in Column E to be green;
If Column E ends up being a % between 0 and 3 (e>0% and e<=3%) then the font should be Yellow;
Last but not least if e>3% I would like the color to be Red. Any ideas? I don't believe conditional formatiing will work. This will go for many rows. Thanks,

Diggs

Conditional formatting should work:

First rule (green) --> =((C3-D3)/D3)<0
Second rule (yellow) --> =AND((C3-D3)/D3>0%,(C3-D3)/D3<=3%)
Third rule (red) --> =((C3-D3)/D3)>3%

Just make sure when you apply the rules that Excel doesn't put quotes around your formula
 
Upvote 0

Forum statistics

Threads
1,215,386
Messages
6,124,628
Members
449,176
Latest member
Dazjlbb

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