Hi
here goes
Sub aaa()
lastcol = Cells(2, Columns.Count).End(xlToLeft).Column
For i = 3 To Cells(Rows.Count, 1).End(xlUp).Row
sixcnt = 0
sixcnttot = 0
For j = 2 To lastcol - 1
If Cells(i, j) <> 0 Then sixcnt = 0
If Cells(i, j) = 0 Then sixcnt = sixcnt + 1
If sixcnt = 6 Then
sixcnttot = sixcnttot + 1
sixcnt = 0
End If
Next j
Cells(i, lastcol + 1).Value = sixcnttot
If sixcnt >= 45 Then Cells(i, lastcol + 1).Interior.ColorIndex = 3
If sixcnt >= 90 Then Cells(i, 1).EntireRow.Interior.ColorIndex = 3
Next i
End Sub
rylo
Bookmarks