conditionally formatting colour of cells

T

trishb

Is there a way to automate the colour of a cell based on the value of another
cell even though the cell I'm colouring has its own formula already?

For example, if a21 is a positive number, I want b21 to be green. If a21 is
negative, I want b21 to be red. If it's 0 then white. But B21 is already a
sum total of something else so I don't want to disrupt that formula
 
M

Mike H

Hi,

Yes you can do that with conditional formatting. Select B21 and then

Format|Conditional formatting - Select 'Formula Is' from the dropdown
Enter the formula
=A21>0
click format and select Green OK

Click ADD and repeat the above but this time use the formula
=A21<0 and pick Red

Note that the cell will not be coloured if A21 =0

Mike
 
G

Gord Dibben

Conditional formatting does not disrupt formulas in cells.

CF does not change the value in a cell, just changes the color or font or
border.

Mike has given you the steps for CF.


Gord Dibben MS 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

Top