the formulae in ColumnD can then be replaced with Copy/Paste Special/Values. However, when there are multiple rows with ITEM IDs, it works correctly.Īpplication.Run ''2018 Processed_Invoices.xlsm'!Select_ALL'Īpplication.Run ''2018 Processed_Invoices. Select How to use Multiple Ranges in Excel VBA Following macro code will. When there are only two rows (one that is a duplicate with a blank in the ITEM ID), I receive the aforementioned error. 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 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.
It says 'You can't paste this here because the Copy area and paste area aren't the same size.'