Is it possible to decrement in For each loop in VBA for Excel?
I have code like this:
Sub Makro1()
Dim rng As Range
Dim row As Range
Dim cell As Range
Set rng = Range("B1:F18")
For Each row In rng.Rows
If WorksheetFunction.CountA(row) = 0 Then
row.EntireRow.Delete
'Previous row
End If
Next row
End Sub
And I want to step back in commented statement. Is it possible?
No.
You have to use a
For...Next
loop and step backwards: