Я заметил, что у вас есть еще один вопрос, поэтому я тоже попробовал.
Я знаю, что этого не было в вашем исходном запросе, но я добавил раздел, который сначала очищает содержимое файла "RPG" (только начиная со строки 5 и ниже), чтобы вы ни к чему не обратились проблемы. Таким образом, у вас всегда будет пустая страница для вставки ваших новых данных, и у вас никогда не останется данных с прошлого раза, если ваши новые данные меньше ваших старых данных. Если вам не нужен этот бит, не стесняйтесь оставить его.
Sub Get_New_Data_From_Other_Workbook()
'
' This macro will copy data from a .xlsx file and paste it back into the .xlsm file
' Any contents in the .xlsm file will first be deleted
' Clear the existing contents of the destination sheet
Windows("RPG - Apr Mnth acs by co.xlsm").Activate ' Make sure the RPG file is selected
Sheets("010 - RPL").Select ' Select the required sheet
Range("A5").Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select ' From A5, select every cell until the end of the page (up to where the data stops)
Application.CutCopyMode = False
Selection.ClearContents ' Delete contents
Range("A1").Select ' Select A1 for presentation purposes
' Go to the correct sheet of the other workbook and copy the data
Windows("Month By Month Income Statement 10.xlsx").Activate ' Select the other workbook
Sheets("Month By Month Income Statmen-A").Select ' Select the sheet with the data on
Range("A5").Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select ' From A5, select every cell until the end of the page (up to where the data stops)
Selection.Copy ' Copy the data
' Come back to the macro workbook and paste the data in A5 of the required sheet
Windows("RPG - Apr Mnth acs by co.xlsm").Activate ' Select the RPG file
Sheets("010 - RPL").Select ' Select the required sheet
Range("A5").Select ' Select cell A5
ActiveSheet.Paste ' Paste the data
Range("A1").Select ' Select A1 for presentation purposes
End Sub