Detect Colours

  • Thread starter Thread starter ShaunM
  • Start date Start date
S

ShaunM

Hi

A Colleague has just asked me if there is any way, without using VB to
detect font colours by using an IF statement formula.

ie. He has created a sheet that if a user changes a cell then the cell
that is changed turns red. He would like to detect this change by using
a formula.

I suspect this is not possible but if it is could somebody please pass
on an example?

Thanks in advance
Shaun
 
Even using VBA, it can get ugly pretty fast.

Any chance your colleague could mimic the conditional formatting in another
cell?
 
Not sure why you can't accept VBA, but if you can persuade your friend,
then:

Add a module

Paste in

'---------------------------------
Public Function Cula(Sel As Excel.Range)
Cula = Sel.Font.Color
End Function
'----------------------------------

in the cell use the formula

=IF(Cula(A1)=255,"Red","Not Red")

Come on, Dave, it's not *that* ugly :-)

Gaz
 
This doesn't return the color based on conditional formatting.

But if the OP wants to return the color based on formatting--not conditional
formatting, Chip Pearson has another version at:

http://www.cpearson.com/excel/colors.htm
(Look for: Returning The ColorIndex Of A Cell)

But if you really want to return the color based on conditional formatting, take
a look at Chip's page:

http://www.cpearson.com/excel/CFColors.htm

(Which is not for the faint of heart--at least when I look at it!)

===
I was guessing that the OP had used conditional formatting for that cell. I may
have misinterpreted the question.
 
Back
Top