I have this function to get the color which is set by a conditional format.
Function ColorIndex(CellColor As Range)
ColorIndex = CellColor.DisplayFormat.Interior.ColorIndex
End Function
But when I use this function in my worksheet it always returns as #value.
How can I make this work?