title: Iteration for Ranges VBA
body: <p>i've got some problems with VBA in excel. I'm trying to do some equivalent of iteration but in Range type. Ofcourse it doesn't work. Is there any option to omit this or some sort of function that will do what i want?</p>
  
  <pre><code>Sub trial()
      Dim rng As Range
      Dim rng_tmp As Range
      Dim rngf As Range
  
      Dim lastrow As Long
      Dim lastcol As Long
  
      lastcol = Sheets("Data").Range("A1").End(xlToRight).Column
      lastrow = Sheets("Data").Range("B" &amp; Sheets("Data").Rows.Count).End(xlUp).Row    
  
      For i = 2 To lastrow
          If Sheets("Data").Cells(i, 12).Value &lt;= 5 Then
              Set rng_tmp = Sheets("Data").Range(Sheets("Data").Cells(i, 1), Sheets("Data").Cells(i, lastcol))
          End If
  
          With Sheets("Data").Cells(i, 12)
              If .Value = "11970BR" Or .Value = "13765BR" Or .Value = "14000BR" Or .Value = "14041BR" Or .Value = "14295BR" Or .Value = "14296BR" Or .Value = "14369BR" Or .Value = "14608BR" Or .Value = "14699BR" Then
                  Set rng_tmp = Sheets("Data").Range(Sheets("Data").Cells(i, 1), Sheets("Data").Cells(i, lastcol)).Select
              End If
          End With
  
          ***Set rng = Union(rng, rng_tmp)***
      Next i
  
      rng.Select
  
  End Sub
  </code></pre>
  
  <p>This bold and italic (or piece of code between *) line is an equivalent of i=i+1. Is there a way to apply it to Range type?
  Thanks for help.</p>