title: Excel vba for loop changing loop variable inside a loop
body: <p>Lets say I have a For loop similar to this:</p>
  
  <pre><code>Sub forLoop()
  Dim firstRow As Integer
  Dim lastRow As Integer
  Dim aRow As Integer
  firstRow=5
  lastRow=200
  For aRow = firstRow to lastRow
     If (something) Then  //lets say it happened when aRow = 18
         aRow=aRow+1  //=&gt; aRow=19 
         ...
     End If
  Next aRow  //which one ? will next aRow be 19 or 20?
  </code></pre>
  
  <p>And I increment a aRow variable inside the loop. Would it result in that variable being incremented twice as much?</p>