title: excel vba loop thru range and copy to single cell
body: <p>I am trying to do a loop with Excel VBA, I have a data range in a1:a1000, I want to loop through them and copy one by one to single cell of C1, but below code not working, any idea what went wrong?</p>
  
  <pre><code>Dim I As Integer
  
  For I = 1 To lastrow - 1
      Sheets("display").Range("w1").Value = Sheets("data").Range("c1").Offset(I, 0).Value              
      msgbox Sheets("data").Range("c1").Value    
  Next I
  </code></pre>