title: VBA Macro Loop unable to copy numbers from another sheet
body: <p>I have this For loop vba code wherein I have a summary sheet (Stock Strategy sheet) where it summarizes all the numbers I need from different sheets. </p>
  
  <p>I have grouped the codes that suppose to copy the numbers through comments for everyone's reference.</p>
  
  <p>Anyway, what seems to be not working is the "VOLUME" portion. The other two (ADX and Close) is working perfectly but the "Volume" is not. Which is weird because the code execution is the same with the other two.</p>
  
  <pre><code>Private Sub pback()
  
  Dim i As Integer
  Dim wsx As Worksheet
  lastrow = Sheets("Stocks Strategy").Cells(Rows.Count, 1).End(xlUp).Row
  
  Set wsx = Sheets("Stocks Strategy")
  
  For i = 3 To lastrow
  
  'Close
  wsx.Cells(i, 4).Value = Sheets(wsx.Cells(i, 1).Value).Range("E1048576").End(xlUp).Value
  wsx.Cells(i, 5).Value = Sheets(wsx.Cells(i, 1).Value).Range("E1048576").End(xlUp).Offset(-1, 0).Value
  wsx.Cells(i, 6).Value = Sheets(wsx.Cells(i, 1).Value).Range("E1048576").End(xlUp).Offset(-2, 0).Value
  
  
  'Volume - not sure why its not working
  wsx.Cells(i, 13).Value = Sheets(wsx.Cells(i, 1).Value).Range("S1048576").End(xlUp).Value
  wsx.Cells(i, 14).Value = Sheets(wsx.Cells(i, 1).Value).Range("S1048576").End(xlUp).Offset(-1, 0).Value
  wsx.Cells(i, 15).Value = Sheets(wsx.Cells(i, 1).Value).Range("S1048576").End(xlUp).Offset(-2, 0).Value
  
  'ADX
  wsx.Cells(i, 8).Value = Sheets(wsx.Cells(i, 1).Value).Range("Q1048576").End(xlUp).Value
  wsx.Cells(i, 9).Value = Sheets(wsx.Cells(i, 1).Value).Range("Q1048576").End(xlUp).Offset(-1, 0).Value
  wsx.Cells(i, 10).Value = Sheets(wsx.Cells(i, 1).Value).Range("Q1048576").End(xlUp).Offset(-2, 0).Value
  
  
  Next i
  End Sub
  </code></pre>
  
  <p>Screenshots of my sheets:</p>
  
  <p><strong>Stocks Strategy</strong></p>
  
  <p><em>(Column A represents the Sheet Names where it will get the numbers "Close", "ADX" &amp; "Volume") )</em></p>
  
  <p><a href="https://i.stack.imgur.com/rzpf0.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rzpf0.jpg" alt="enter image description here"></a></p>
  
  <p><strong>Sample Source Sheets</strong> <em>(sheets where Stocks Strategy will get the numbers)</em></p>
  
  <p><a href="https://i.stack.imgur.com/kwpk3.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kwpk3.jpg" alt="image here"></a></p>
  
  <p><strong>Just a note:</strong> All the sheets are in the same workbook.</p>
  
  <p>Would any one point out what's wrong? I would appreciate if anyone could also suggest a better way of coding this task?</p>