Sub test()
Dim i&
For i = 3 To [a65536].End(xlUp).Row
If Cells(i, 2) <> "" Then
If Cells(i, 2) > 5 Then
Cells(i, 2) = ""
Cells(i, 3) = 0
Else
Cells(i, 2) = Cells(i, 2) + 1
End If
End If
If Cells(i, 3) <> "" Then Cells(i, 3) = Cells(i, 3) + 1
Next
End Sub