Thread: IF function
View Single Post
  #3   Report Post  
Biff
 
Posts: n/a
Default

Hi!

This isn't a very straight forward thing to accomplish in
Excel.

Here's one way: (I assume that you are only interested in
either RED or BLACK)

You have to create a named formula and then call that
named formula in your IF function.

Goto InsertNameDefine

Name: TextColor

In the Refers To box enter this formula:

=GET.CELL(24,INDIRECT("RC[-1]",FALSE))

Now, in cell B1 you can enter this formula to test for red
or black text in cell A1:

=IF(TextColor=3,"red",IF(TextColor=0,"black","neit her"))

Important: this formula will not automatically update
if/when the text color changes. You would have to do a
manual calculation by hitting F9 or wait until an
automatic calculation is triggered by some other event.
That's just the way it is! Can't do anything about it.

For more detailed info, see:

http://cpearson.com/excel/colors.htm

http://xldynamic.com/source/xld.ColourCounter.html

Biff

-----Original Message-----
How do I determine the font color of a cell with an IF

function?
This is how I would think its done (the following formula

could be in B1):
IF A1=red,"RED","BLACK"
If the font color in A1 is red, then RED is printed in

B1, otherwise BLACK
is printed in B1.
but this does not work. Any suggestions?
.