S
SNC-DW
Hi
I've used the following code to count the number of cells in a rang
that are filled yellow, using the basic funtion '=CountYellow(A1:A99)'
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
However I now need to count the same range of cell that are coloure
but contain only zeros, any ideas?
Thank
I've used the following code to count the number of cells in a rang
that are filled yellow, using the basic funtion '=CountYellow(A1:A99)'
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
However I now need to count the same range of cell that are coloure
but contain only zeros, any ideas?
Thank