title: Change a variable in a loop in Excel each time it runs using a value in a range
body: <p>I have the following macro which loops through the numbers 1 to 17. The problem is, the numbers are no longer 1 to 17 and may change again, so I would like a sheet where those numbers are manually entered in one column, the loop would then act on each cell value in that column.</p>
  
  <p>Basically, I want to replace the "J = 1 To 17" with the contents of a range in a single column.</p>
  
  <p>Here is the original:</p>
  
  <pre><code>Sub Nottingham3()
      For j = 1 To 17
          Dim LR As Long, i As Long
          Sheets("Stager").Cells.Clear
          With Sheets("basic list")
              On Error Resume Next
              LR = .Range("A" &amp; Rows.Count).End(xlUp).Row
              For i = 1 To LR
                  If .Range("A" &amp; i).Value = j Then .Rows(i).Copy Destination:=Sheets("Stager").Range("A" &amp; Rows.Count).End(xlUp).Offset(1)
              Next i
          End With
          NottsCopyData
      Next j
  End Sub
  </code></pre>
  
  <p>Nothing I've tried is producing exactly what I need.</p>