When my count reaches 16 I want to drop down to the next row(s) and continue on. Right now the only way I can do that is with the Exit Sub or End statement after my counter.(See less than signs)
I just want to place the value 16times and then continue down to the next row that meets the criteria. Thanks
Dim CurrentColumn As Integer, XColumn As Integer, CurrentRow As Long, Totalrow As Long, Count As Long
With ActiveSheet
CurrentColumn = 7
XColumn = 106
Totalrow = 299
Do Until CurrentColumn = 103
CurrentRow = 11
Totalrow = .cells(8, CurrentColumn).Value
While Totalrow < Range("I383").Value And CurrentRow < 298
If .cells(CurrentRow, CurrentColumn).Value = "." Then
If .cells(CurrentRow, XColumn).Value = "x" _
And CurrentColumn >= 27 _
And .cells(CurrentRow, CurrentColumn).Offset(0, -1) <> "." Then
.cells(CurrentRow, CurrentColumn).Value = "LVD"
Count = Count + 1
If Count > 16 Then End '<<<<<<<<
Totalrow = Totalrow + 1
End If
End If
CurrentRow = CurrentRow + 1
Wend
CurrentColumn = CurrentColumn + 1
Loop
End With
Bookmarks