Hi Everyone!
I'm looking for a fix (possibly VBA code, or whatever else will work) that will DELETE rows in multiple sheets in multiple areas depending on the value of a reference cell.
My spreadsheet is set up so that someone enters some information regarding a shipment of goods, and then that information is transferred to multiple different sheets to create shipping documents. These documents are then automatically saved as PDF files and sent to myself in an email. The issue is that, depending on the number of "Goods" I'm shipping (the maximum being 6), I would like to have rows in these shipping documents automatically deleted to shorten the length of the document and not create 'blank space' in them. I'm electing for deleting rows (rather than adding) since of course these rows have formulas to carry over the data from the "Input" tab.
Example: If, in the Input tab, it's noted that there are 4 goods being shipped, perhaps I click a button to run the macro/VBA code, which then deletes the unnecessary rows in each of these shipping documents. I've added some photos to make things more clear:
Let's say I have chosen 3 x goods to be shipped. After running the code, it would go into "Document #1" (PHOTO#1) and delete rows 25, 26, & 27, leaving only rows 22, 23, and 24 with the data of the goods being shipped. It would also go into "Document #2" (PHOTO #2) and delete rows 22:24, 30:32, and 38:40. The row placement will always be the same in each of these documents.
I've also attached the workbook itself if that makes it easier to understand. Will greatly appreciate anybody's help with this, and if this turns into being a lot of work I'm happy to pay for it.. $10, $20 or whatever you guys/gals think this is worth. I have gotten a lot of help from this site and I am beginning to feel bad as I have not been able to offer much in return to date. I am doing my very best to learn how to code but it is hard!!
Bookmarks