I am trying to automate a process in which I copy and paste rows of data from a spreadsheet called “remittance” to multiple new spreadsheets depending on the “supplier name” in column D. Column D is sorted alphabetically. Every time the text changes in column D, I need the macro to copy the rows above (that all have matching text in column D) and paste it to a separate spreadsheet. Then I need it to continue down column D copying and pasting to new spreadsheets.
For example, say the text in column D is “supplier X” from cell “D2” to “D5”, and then the text changes to “supplier Y” from cell “D6” to “D8”. I need a macro that will copy rows 2 through 5 to a new worksheet and name it “supplier X” and then move down column D from the “remittance” spreadsheet and copy rows 6 through 8 to a new spread sheet and name it “supplier Y”. I need the process continued until there is no more data in column D from the “remittance” spreadsheet. I would also like to have the header row copied to each of the new spreadsheets created.
I am very new to macros, and would really appreciate any help that I can get!!!! If I can supply any additional information or clarification, please let me know.
Bookmarks