title: VBA Loop through the amount of rows given in InputBox
body: <p>I would like to loop through the amount of rows that are entered in the Input box +1.</p>
  
  <pre><code>Sub LoopEnter()
      myNum = Application.InputBox("Enter number")
      For Each r In Range ("A2":"A" &amp; myNum +1)
          r.Offset (0.1) = "N"&amp; r
          Next r
      End Sub
  </code></pre>
  
  <p>However, <code>("A2":"A" &amp; myNum +1)</code> is not recognized as a range. What's the correct way to make the range, for example (A2:A41) if the number entered in the InputBox is 40?</p>