Dim iI%, iNum%, bCheck As Boolean, bNext As Boolean
iI = 0
iNum = 1
bNext = False
bCheck = True
With Sheets(1)
While bCheck
iI = iI + 1
If .Cells(iI, 2) <> "" Then
.Cells(iI, 1) = iNum
bNext = False
Else
If bNext = True Then
bCheck = False
Else
iNum = iNum + 1
bNext = True
End If
End If
Wend
End With