Need to count formated Cells in Excel Macro
I came up with this and it works fine. Thanks.
Sub P3()
Dim c As Range
Dim i As Long
For Each c In ActiveSheet.UsedRange
If c.Interior.ColorIndex = 45 Then
i = i + 1
End If
Next
Range("H945").Value = i
End Sub
|