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?
ShaunM wrote:
>
> 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
>
> --
> ShaunM
> ------------------------------------------------------------------------
> ShaunM's Profile: http://www.excelforum.com/member.php...o&userid=18610
> View this thread: http://www.excelforum.com/showthread...hreadid=381460
--
Dave Peterson
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
2B OR NOT 2B, that is FF
can't you just do conditional formatting?
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.
gazornenplat wrote:
>
> 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
>
> --
> gazornenplat
>
> ------------------------------------------------------------------------
> gazornenplat's Profile: http://www.excelforum.com/member.php...o&userid=24494
> View this thread: http://www.excelforum.com/showthread...hreadid=381460
--
Dave Peterson
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks