title: Excel Macro Requires Multiple Executions to function correctly
body: <p>Good morning,
  I am having some issues in running an Excel macro I've developed. It was working fine before, but the past couple months it requires me to delete data and re-run it for the intended results.
  The purpose of this code is to copy and paste from one workbook to another, copying a series of specific ranges to the corresponding ranges in the second workbook starting at the last blank row. The code is as follows:</p>
  <pre class="lang-vb prettyprint-override"><code>Sub Import_Data
  
      DimFileToOpen As Variant
      Dim OpenBook As Workbook
      Application.ScreenUpdating=False
      FileToOpen=Application.GetOpenFilename(Title:=&quot;File Import&quot;, _
                          FileFilter:=&quot;ExcelFiles(*.xlsx*),*.xlsx*&quot;)
      If FileToOpen &lt;&gt; False Then
          Set OpenBook=Application.Workbooks.Open(FileToOpen)
          OpenBook.Sheets(1).Range(&quot;$AQ$2:$AQ$1500&quot;).Copy
          ThisWorkbook.Worksheets(2).Range(&quot;A&quot; &amp; Rows.Count).End(xlUp).Offset(1,0).PasteSpecial xlPasteValues
  
          OpenBook.Sheets(1).Range(&quot;$C$2:$C$1500&quot;).Copy
          ThisWorkbook.Worksheets(2).Range(&quot;B&quot; &amp; Rows.Count).End(xlUp).Offset(1,0).PasteSpecial xlPasteValues
          '......
          Open.Application.CutCopyMode=False
          OpenBook.Close False
      End If
      Application.ScreenUpdating=True
  
  End Sub
  </code></pre>
  <p>Again, when I run it the first time it transposes rows, columns, and data or it omits data altogther. When I delete the imported data and rerun the macro, it imports the data correctly. I just want to figure out a way to make it work the right way the first time.</p>
  <p>Any help would be greatly appreciated.</p>
  <p>Thanks!</p>