You can use the UDF below:
Code:
Function CellColorIndex(InRange As Range, Optional _
OfText As Boolean = False) As Integer
Application.Volatile True
If OfText = True Then
CellColorIndex = InRange(1, 1).Font.ColorIndex
Else
CellColorIndex = InRange(1, 1).Interior.ColorIndex
End If
End Function
Then in the cell: =If(cellcolorindex(A4)=3;"Expired";"")