COLORS

  • Thread starter Thread starter jacob farino
  • Start date Start date
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
 
Hi Jacob,

Look at conditional formatting:

Format | Conditional Formatting | Formula Is ....
 
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)
 

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