Changing background and font colors in formulas

B

bdicarlo1

How would I go about changing colors within a formula. What I would
like to do is as follows. As example, formula would be in cell H37.

If G37 > Now() and I37 is < 100%, then "RED" else "GREEN"

Where text indicated is RED, then I want the font black and the
background color to be red
Where text indicated is GREEN, then I want the font to be white and the
background color to be green.

Can this be accomplished within the formula?
 
B

bdicarlo1

Thank you Don, but it is sort of possible. I just figured it out.
It's possible thru the use of Conditional Formatting. Goto the cell
you want to format, choose Format and Conditional Formatting from tool
bar...and the colors will be changed based on whatever criteria is set.
It's a bit different than having it withing the formula, but the goal
is accomplished.
 
D

David McRitchie

Yes, but Conditional Formatting is use of formulas. <egregious grin>

The only coloring shown "within" a formula is nesting, but from the
question it would be obvious that it was "By" a formula. Cell formulas are
not the only use of formulas on the worksheet, Conditional Formatting
is based on the same kind of formulas as used in cell formulas. The
formulas in Conditional Formatting resolve to True or False. with errors
being resolved as False.

More information on Conditional Formatting in
http://www.mvps.org/dmcritchie/excel/condfmt.htm

HTH,
David McRitchie, Microsoft MVP - Excel
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Don Guillett" <dguillett1... wrote
 

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