title: How to improve loop speed without referencing cells VBA?
body: <p>I am running the code below to extract data from worksheets and spit it out, it is very slow, any ideas for speed improvements?</p>
  <p>Essentially this loop is to extract data from an array (from a database)</p>
  <p>I have done the usual turn off calcs etc, what I am looking for is how to loop without going through the worksheet cells as that is what is taking a long time I think.</p>
  <p>Thanks!</p>
  <p>Here is the code:</p>
  <pre><code>    Set RawDataD1WS = PnLWB.Worksheets(&quot;Raw_Data_D1&quot;)
      Dim VarBunker As Variant
      
      
  For i = LBound(VarBunker, 1) To UBound(VarBunker, 1)
  
      For k = LBound(VarBunker, 1) To UBound(VarBunker, 2)
      BunkerD1WS.Cells(k + 2, i + 1) = VarBunker(i, k)
      Next k
  
  Next i
  </code></pre>