vicktor schausberger
Member
Hello, all Chandoo Experts.
Trying to count the Cells without color, on sheet 1 and the answer on sheet 3, the color in the sheet is a format color generate by another code.
here for example on I count before the color: meaning 3 values and the values 238, 176 do not count so the expected results are 3-8-8-8-8-8 do not show up on the picture but there are a color yellow on row 9 what I did is this:
>>> use code - tags <<<
Thanks.
Trying to count the Cells without color, on sheet 1 and the answer on sheet 3, the color in the sheet is a format color generate by another code.
here for example on I count before the color: meaning 3 values and the values 238, 176 do not count so the expected results are 3-8-8-8-8-8 do not show up on the picture but there are a color yellow on row 9 what I did is this:
>>> use code - tags <<<
Code:
Sub gg()
Dim i As Long, n As Long, j As Long
For j = 2 To 7
For i = 3 To Range("I" & Rows.Count).End(3).Row
If Range("I" & i).Interior.ColorIndex = xlNone Then
n = n + 1
Else
Exit For
End If
Next i
Next j
Sheet3.Cells(i, j).Value = n
End Sub
Last edited by a moderator: