Try this:
=FontColor(A1)
But first:
Press Alt+F11. Insert Module. Copy and Paste the below:
Public Function FontColor(MyCell As Range) As Variant
Application.Volatile True
FontColor = MyCell.Font.ColorIndex
End Function
Ola Sandstrom
Note:
Excel normally don't recalcualte if a cell change font color. That is why we
include Application.Volatile True
But this can make Excel slow.
To speed up, include a ' in front of Application.Volatile True. This will
deactivate Application.Volatile True.
Then use =IF(NOW()0,GetColor(A1),"").
|