Karthik Thandapani
Member
Hi,
Presently I have a snippet that will find cells which are highlighted in red and report in a cell. What I would like to receive help is; to count the total number of red cells and put that count in cell G3.
ColorIndex = 3
Please see the attached file.
Thanks,
Karthik
Presently I have a snippet that will find cells which are highlighted in red and report in a cell. What I would like to receive help is; to count the total number of red cells and put that count in cell G3.
ColorIndex = 3
Please see the attached file.
Thanks,
Karthik
Code:
Sub ValiCheck_BG()
Application.ScreenUpdating = False
Worksheets("Sheet1").Activate
Dim i As Long, r As Range, coltoSearch As String
coltoSearch = "A"
For i = 1 To Range(coltoSearch & Rows.Count).End(xlUp).Row
Set r = Range(coltoSearch & i)
If r.Interior.ColorIndex = 3 Then
Range("G2").Value = "Found"
End If
Next i
End Sub