dynamically changing text color

G

Guest

Is there a way to have the text/font color change in a cell depending on the
value entered?
For example: starting with cell A1, if I enter a value in cell A2 and it is
a lower number than A1 can it dynamically change to red text? Or if the value
in A2 is greater than A1 can it dynamically change to green text?

What I am trying to accomplish is enter multiple values in a column and just
enter the number in each cell, A1, A2, A3... and depending on the value
comparison to the cell above, change the color of the cell contents. Is that
possible?
 
T

T. Valko

What version of Excel do you have?

This is for versions prior to Excel 2007.

Assume you want to apply this to the range of cells from A2:A10

Select the range A2:A10
Goto the menu Format>Conditional Formatting
Condition 1
Formula Is: =AND(COUNT(A1:A2)=2,A2<A1)
Click the Format button
Set the font color to RED
OK
Click the ADD button
Condition 2
Formula Is: =AND(COUNT(A1:A2)=2,A2>A1)
Click the Format button
Set the font color to GREEN
OK out

This assumes that you intend to enter values in the cells in sequence. Like:

A1, A2, A3, A4, A5 etc

Not like:

A1, A2, A5, A10

If intend to go out of sequence we'll need different formulas.

Biff
 
G

Guest

Thanks Biff, works perfectly. I have the workbook saved for Excel 2003 and
2007. Are there different rules on 2007?

D
 
T

T. Valko

Are there different rules on 2007?

The same formulas will work. I don't have Excel 2007 so I don't know how to
actually get to the conditional formatting menus (ribbon in Excel 2007). So,
in my reply I say go here, select this, do that, but these steps may not
apply in Excel 2007.

Biff
 
P

Peo Sjoblom

It is actually quite different although you can eventually get to a similar
dialogue box as in earlier versions. As usual it takes much longer to get
the same thing done.
 

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