Copy/delete rows based on group numbers

Microsoft corporation Office 2010 profes...
December 20, 2014 at 04:37:13
Specs: Windows 7
Hello all

I have a worksheet that looks like this example worksheet I have made:

http://www.filedropper.com/examples...

For sheet1 I need some code that can insert a new row below the last row in each group, then copy the last row in each group and insert it below the last row in each group the number of times defined in the datasheets Number of customers in group cells. I have only 3 groups in this example sheet, but I would maybe need to expand to 6 groups later on. If I later on change the value of those number of customers in group cells to a lower number, the rows that are too much in sheet1 should be deleted, starting with the last row in each group. Its also important that data isnt erased unless its located in the last row of each group and that row is being deleted by the code because a lower number was specified in the datasheets Number of customers in group cells. It is also important that the rows being copied and inserted isnt deleting any rows from the next group, but that I think wouldnt happen if a new row first was inserted and then the last row was copied to that row.

The rows in sheet1 represents 1 customer and only 1.

Thanks in advance for your time

/JacobJ


See More: Copy/delete rows based on group numbers

Report •

#1
December 28, 2014 at 02:55:50
Your screenshot link does not work, it only opens the Filedropper main page.

Open Excel and press F1 for help with using Excel.

message edited by phil22


Report •

#2
January 1, 2015 at 02:00:01
Merry christmas and a happy new year. I am back from holidays, so sorry for the delay of my late reply. Here is a new link to the example sheet I have made:

http://www.filedropper.com/examples...


Report •
Related Solutions


Ask Question