IF - formatting problem

S

Stephen

Hi Folks,

I have two columns that calculate out to be percentages. I'd like to
compare one against the other and color the cell based on a +/- 10%.

ei; A1 = 90% B1 = 100%

-since A1 is - 10% of B1, then color cell A1 font color Red.

**

ei; A1 = 100% B1 = 90%

-since A1 is + 10% of B1, then color cell A1 cell color Yellow.

I'm not sure if I can do this with straight up conditional formatting or if
I need this to run in some sort of code?

Any help is greatly appreciated!

TIA!
 
R

Roger Govier

Hi Stephen

You can do it with CF
Formula Is =(A1-B1)>A1>=10% format Red
Formula Is =(A1-B1)/A1<=-10% format Yellow
 
E

Eduardo

Hi Stephen,
I assume that in cell C1 you have the formula =(B1/A1)-1, what gives you the
lets say 0.10
Then Highlight the column and go to conditional formating and choose to
highlight with green if the values are greater or equal to 0.10 and with
yelow if they are less than 0.10
 
C

Chip Pearson

I think your in the wrong thread.

Yep.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 
Top