Retrieve the Font Color Index of a Cell using VBA in Microsoft Excel

Enter the following code into VBA.

Function FontColor(CellColor As Range)
FontColor = CellColor.Font.ColorIndex
End Function

To use the this Custom Function type =FontColor(A1) into any cell.

Caution - This function does not update automatically when the interior color of a cell changes.

Return to Excel Exchange homepage.