title: Why won't it loop?
body: <p>The auto scroll works fine, but I'm trying to get this to loop back around but once it returns to A1, it just stops and the macro seemingly is done. What did I do wrong?</p>
  
  <pre><code> Sub ReRunMacro()
   Dim xMin As String
   Dim lastRow As Long, i As Long
   Dim ws As Worksheet
   Dim validSheets() As Variant
  
   Set ws = ActiveSheet
  
   validSheets = Array("CNC Machining Cell 2", "CNC Grinding Cell", "CNC Turning Cell 1 &amp; 3", "CNC Turning Cell 2")
  
   If UBound(Filter(validSheets, ws.Name)) = -1 Then 
   Exit Sub 
   End If
  
   lastRow = Range("A" &amp; Rows.Count).End(xlUp).Row
  
   For i = 1 To 14 Step 2
  
  
         Cells(i, 1).Select
         ActiveWindow.SmallScroll down:=1
         Application.Wait (Now + TimeValue("0:00:02"))
         If i = lastRow - 2 Or i = lastRow - 1 Then
         i = 0
         Cells(1, 1).Select
      End If
    Next i
    Range("A1").Activate
  
    End Sub
  </code></pre>