adding color to cells based on a formula

  • Thread starter Thread starter fyrfytr265
  • Start date Start date
F

fyrfytr265

Have a very simple problem, at least im sure it will be simple for
someone. I would like to add color to cells based on the value that is
in those cells, but the value also must be compared to another cell to
determine if it needs to be shaded. For example, I would like the shade
B2 if it is a positive value, and the value in A2 is negative. However
the values in these cells was already derived by using a formula, and i
dont know how to combine these two formulas. any suggestions?
 
Hi!

Select cell B2

Goto Format>Conditional Formatting
Formula is: =AND(ISNUMER(B2),B2>=0,A2<0)
Click the Format button
Select the style(s) desired
OK out

Biff
 
fyr

Select B2 and Format>Conditional Formatting>Formula is........

=AND(A2<0,B2>=0)

Select a pattern from format and OK your way out.


Gord Dibben Excel MVP
 

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

Back
Top