title: Understanding VBA code using "TO" and "STEP"
body: <p>I was given this code to run in excel but I am trying to understand what it means. I especially would like to know the Variable portion? Any help would be greatly appreciated.</p>
  
  <pre><code>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" &amp; i) &lt;&gt; "Amanda Weaver" And Range("f" &amp; i) &lt;&gt; "Debra Wiesemann" And _
     Range("f" &amp; i) &lt;&gt; "Drew Simpson" And  Range("f" &amp; i) &lt;&gt; "James Howard" And _
     Range("f" &amp; i) &lt;&gt; "Jeff Hruby" And Range("f" &amp; i) &lt;&gt; "Jessica Czupryn" And _
     Range("f" &amp; i) &lt;&gt; "Kevin Janke" And Range("f" &amp; i) &lt;&gt; "Matthew Hudspeath" And _
     Range("f" &amp; i) &lt;&gt; "Maurey Peterson" And Range("f" &amp; i) &lt;&gt; "Noah Hadro" And _
     Range("f" &amp; i) &lt;&gt; "Thomas McHenry" And Range("f" &amp; i) &lt;&gt; "Thomas McHenry" Then
  
    Range("f" &amp; i).EntireRow.Delete Shift:=xlUp
   End If
  
  Next i
  
  Application.ScreenUpdating = True
  
  End Sub
  </code></pre>