title: Select last entry and offset by 1 row then paste value not working
body: <p>I'm having Run time error 1004 with this code.</p>
  
  <pre><code>Sub LoopAllExcelFilesInFolder()
  'PURPOSE: To loop through all Excel files in a user specified folder and     perform a set task on them
  'SOURCE: www.TheSpreadsheetGuru.com
  
  Dim wb As Workbook
  Dim myPath As String
  Dim myFile As String
  Dim myExtension As String
  Dim FldrPicker As FileDialog
  
  
  
  
  'Optimize Macro Speed
    Application.ScreenUpdating = False
    Application.EnableEvents = False
    Application.Calculation = xlCalculationManual
  
  'Retrieve Target Folder Path From User
    Set FldrPicker = Application.FileDialog(msoFileDialogFolderPicker)
  
  With FldrPicker
    .Title = "Select A Target Folder"
    .AllowMultiSelect = False
      If .Show &lt;&gt; -1 Then GoTo NextCode
      myPath = .SelectedItems(1) &amp; "\"
  End With
  
     'In Case of Cancel
  NextCode:
    myPath = myPath
    If myPath = "" Then GoTo ResetSettings
  
  'Target File Extension (must include wildcard "*")
    myExtension = "*.xls*"
  
  'Target Path with Ending Extention
    myFile = Dir(myPath &amp; myExtension)
  
      'Loop through each Excel file in folder
    Do While myFile &lt;&gt; ""
  'Set variable equal to opened workbook
    Set wb = Workbooks.Open(Filename:=myPath &amp; myFile)
  
  'Ensure Workbook has opened before moving on to next line of code
    DoEvents
  
  Dim LastRow As Long
  Dim rng1 As Range
  wb.Worksheets(1).Activate
  Set rng1 = Range("B15:E81,N15:O81")
  
  With ThisWorkbook.Worksheets("Sheet1") '&lt;-- modify "Sheet1" to your sheet's name
  LastRow = .Cells(.Rows.Count, "E").End(xlUp).Row ' get last row with data in column "E"
  ' paste
  .Range("E" &amp; LastRow + 1) = rng1
  End With
  
  'Save and Close Workbook
    wb.Close SaveChanges:=True
  
  'Ensure Workbook has closed before moving on to next line of code
    DoEvents
  
  'Get next file name
    myFile = Dir
    Loop
  
  'Message Box when tasks are completed
    MsgBox "Task Complete!"
  
  ResetSettings:
    'Reset Macro Optimization Settings
      Application.EnableEvents = True
      Application.Calculation = xlCalculationAutomatic
      Application.ScreenUpdating = True
  
  End Sub
  </code></pre>
  
  <ol>
  <li><p>I'm using this segment of code to extract data from B15 to E81 from all the excel workbook in the folder.</p></li>
  <li><p>Upon copying, it will activate the workbook where this code lie</p></li>
  <li><p>Select last entry from column E</p></li>
  <li><p>Offset by 1 row</p></li>
  <li><p>Paste selection to column activated cell </p></li>
  </ol>
  
  <p>Appreciate all the help I could find. Thanks in advance.</p>