cant find project or library
When I try to use the following function I get the following error! What am
I doing wrong?(I think the curosr isstopping on the word CELL)
Thanks
Function CountYellow(MyRange As Range)
Dim iCount As Integer
Application.Volatile
iCount = 0
For Each cell In MyRange
If cell.Interior.ColorIndex = 6 Then
iCount = iCount + 1
End If
Next cell
CountYellow = iCount
End Function
|