Hi,

I'm using Excel 2003.

I'm writing a vba macro and I'm trying to identify the font colour of a cell.
I want to know what colour is currently visible in the cell.

Below I'm checking to see if the current cell has a font colour of 41 (blue).

If Selection.Font.ColorIndex = 41 Then

This works on a cell without conditional formatting, but doesn't work on a cell with conditional formatting.


So, I tried this then realised, it doesn't tell me what colour is visable, it tells me what colour it would be if the 1st conditional formatting rule was true.

If Selection.FormatConditions(1).Font.ColorIndex = 41 Then


Can anyone please tell me what the code should be?

thanks