title: For loop through a row
body: <p>I have a worksheet with entries in column A and row 1:</p>
  <p><a href="https://i.stack.imgur.com/c6UZ2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/c6UZ2.png" alt="enter image description here" /></a></p>
  <p>It is possible with the following code to run a For-Loop through any amount of entries in column A:</p>
  <pre><code>For i = 1 To Worksheets(&quot;Sheet1&quot;).Range(&quot;A1&quot;).End(xlDown).Row
  
      '' Do whatever
  
  Next i
  </code></pre>
  <p>But it is not possible to run a For-Loop through any amount of entries in row 1 with the code below and my question is why?</p>
  <pre><code>For i = 1 to Worksheets(&quot;Sheet1&quot;).Cells(1).End(xlRight).Column
  
      '' Do whatever
  
  Next i
  </code></pre>