Comprender el código VBA usando "TO" y "STEP"
Me dieron este código para ejecutarlo en Excel pero estoy tratando de entender lo que significa. Especialmente me gustaría saber la porción Variable? Cualquier ayuda sería muy apreciada.
sub SortNames
Dim LR As Long
Application.ScreenUpdating = False
Sheets("Stores").Select
LR = Cells(Rows.Count, 1).End(xlUp).Row
For i = LR To 2 Step -1
'Here is where you can add the names
If Range("f" & i) <> "Amanda Weaver" And Range("f" & i) <> "Debra Wiesemann" And _
Range("f" & i) <> "Drew Simpson" And Range("f" & i) <> "James Howard" And _
Range("f" & i) <> "Jeff Hruby" And Range("f" & i) <> "Jessica Czupryn" And _
Range("f" & i) <> "Kevin Janke" And Range("f" & i) <> "Matthew Hudspeath" And _
Range("f" & i) <> "Maurey Peterson" And Range("f" & i) <> "Noah Hadro" And _
Range("f" & i) <> "Thomas McHenry" And Range("f" & i) <> "Thomas McHenry" Then
Range("f" & i).EntireRow.Delete Shift:=xlUp
End If
Next i
Application.ScreenUpdating = True
End Sub