VBA UDF for Color

[Closed]
Report
-
Hello,
I'm sure my question is simple to most of you as I'm new to UDF. I've created the following UDF but cannot apply it across columns when I use =CheckColor1(H13:M13)
Function CheckColor1(range)
If range.Interior.Color = RGB(0, 176, 80) Then
CheckColor1 = "Final"
ElseIf range.Interior.Color = RGB(255, 255, 0) Then
CheckColor1 = "Final"
ElseIf range.Interior.Color = RGB(191, 191, 191) Then
CheckColor1 = "Final"
ElseIf range = 0 Then
CheckColor1 = "Final"
Else
CheckColor1 = " "
End If
End Function