Change color without conditional formating

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I know that I can use conditional formatting to change the color of a cell,
but this can prove cumbersome for multiple cells and multiple values.

Is there a way to change the color of a cell based on a formula in that cell?

For example, assume I have cell A1 = 10 and plan on entering a list of data.
I want to compare each value to cell A1 and change the color accordingly.

I would assume the code would then be as follows:
=if(a2<a1,color=red,color=green)

However, there appears to be no command such as "color" or "fill".
 
Formulas return values.

Some formatting can be done with a formula like

="Payment due " &TEXT(H15,"mmmm, d yyyy") & " " & TEXT(I15,"$#,##0.00")

But cannot change colors.

That's what CF is used for.

You always have the recourse of VBA code.


Gord Dibben MS Excel MVP
 
You can change the font color as the cell value changes using a
custom number format. For instance...
[Blue][>10]General;[Red][<=10]General; General
(more than ten the font is blue; ten and under the font is red)
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"spacesyco" <[email protected]>
wrote in message
I know that I can use conditional formatting to change the color of a cell,
but this can prove cumbersome for multiple cells and multiple values.

Is there a way to change the color of a cell based on a formula in that cell?

For example, assume I have cell A1 = 10 and plan on entering a list of data.
I want to compare each value to cell A1 and change the color accordingly.

I would assume the code would then be as follows:
=if(a2<a1,color=red,color=green)

However, there appears to be no command such as "color" or "fill".
 

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