I am having an issue with my macro. It says "You can't paste this here because the Copy area and paste area aren't the same size."
The object of my macro:
When receiving a new list of invoices, because of how Excel extracts the info from our software, it repeats the information twice or more, but without the ITEM ID. Therefore, I have a macro that selects all the info from Row 6 and on, copies everything in the NEW INVOICES sheet, pastes only the rows with an ITEM ID at the bottom of the previous sheet, then deletes the NEW INVOICES sheet.
When there are only two rows (one that is a duplicate with a blank in the ITEM ID), I receive the aforementioned error. However, when there are multiple rows with ITEM IDs, it works correctly.
Here is my Macro's code:
Dim iRow As Long
For iRow = 1000 To 7 Step -1
If Cells(iRow, "J") = "" Then
Application.Run "'2018 Processed_Invoices.xlsm'!Select_ALL"
Application.Run "'2018 Processed_Invoices.xlsm'!BottomCell"
Selection.PasteSpecial Paste:=xlPasteFormulasAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=True, Transpose:=False
HERE is a sample of the spreadsheet for your perusal:
Any help is appreciated.