Hello! I am very new to this and I have found some code that is helpful, but I do not know how to combine the two efficiently, or even if the second code is exactly what I need.
I have a purchasing log where every PO for a department is input. Based on the Vendor Name in Column F on the main sheet "Entered", I need a macro that will create a new page for each different Vendor and name it the Vendor Name, copy the Header in Row 1 to the new sheet, and then also copy all rows with the same Vendor name to its corresponding sheet. I also need it to cut and rerun each time or only search for new inputs to add to the sheets, always leaving the "Entered" sheet untouched, because the copy/paste code I have now duplicates onto the Vendor sheets every time I run it so the list keeps repeating.
I attached a sample of the spreadsheet. The code I have started are SortPOList and SortPOsByVendor.
SortPOList is the one that is creating the new pages - it starts to run, but once it runs into a duplicate Vendor name it shows that this is a duplicate and cannot create a second sheet for this vendor. I need it to ignore duplicates and move to the next new one. How can I do this?
SortPOsByVendor is the code I originally created to copy/paste rows to the new vendor pages. With this code, I actually had a page for each vendor. But as the log is being continually updated, if I don't catch a new vendor I will not therefore have a page for it and will also need to continuously update the macro. Is there a way to make a simpler code that will copy all rows with the same Vendor to the new sheets that were created?
Thank you in advance for your help - I really appreciate it! This has been driving me nuts!!
Bookmarks