COLORS

J

jacob farino

Is there a simple way to write an IF formula to where if it is TRUE, the
results are displayed one color, and if FALSE, they are displayed another?

I really don't want a macro for this, but maybe that is the only answer.

If it is, can someone give me an example of a simple macro to do this?

Jacob
 
N

Norman Jones

Hi Jacob,

Look at conditional formatting:

Format | Conditional Formatting | Formula Is ....
 
B

Bob Phillips

Jacob,

It needs a UDF, such as

Function GetColour(rng)

GetColour=rng.Font.Colorindex
EndFunction

And use like so

=IF(GetColour(A1)=3,"text is red","")

A more comprehensive solution can be found at

http://www.xldynamic.com/source/xld.ColourCounter.html
Processing Coloured Cells

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Top