yorkshirelad
Board Regular
- Joined
- Aug 18, 2003
- Messages
- 100
Hi - I hope someone can help me on this one, I need to do this exercise thousands of times!
I have a spreadsheet listing products. Each product has data in columns (columns A,B,C,D,E,F). Underneath each product are blank rows before the next product is listed.
I need a macro to copy Row1 columns A to F, and then paste the data in rows 2 to 5 (the next product on the list which is in Row6) - the macro then needs to continue that process until there are no products left.
The number of blank rows vary between each product, I have about six thousand products over about 20,000 lines
APOLOGIES I HAD FORMATTED THE TABLE BELOW TO LINE UP, BUT IT HASN'T WORKED.
Here is a link to a sample file if my description doesn't make sense.
http://www.creativepartnershosting.com/excel/CopyPasteDataSample.xls
Column A, Column B, Column C, Column D, Column E, Column F,
Row 1 45879645, DescrT, ColourJ, SizeIO, SupplierFE, TelephoneK,
BLANK ROWS
Row 6 45879122, DescrG, ColourR, SizeJ, SupplierW, TelephoneL,
BLANK ROWS
Row 9 58794512, DescrR, ColourH, SizeW, SupplierK, TelephoneP,
BLANK ROWS
Row 16 56987456, Descr16, Colour16, Size16, Supplier16, Telephone16,
BLANK ROWS
Row 19 54268747, Descr1G, ColourY, SizeP, SupplierS, TelephoneK,
Any assistance would be really appreciated.
Many thanks
I have a spreadsheet listing products. Each product has data in columns (columns A,B,C,D,E,F). Underneath each product are blank rows before the next product is listed.
I need a macro to copy Row1 columns A to F, and then paste the data in rows 2 to 5 (the next product on the list which is in Row6) - the macro then needs to continue that process until there are no products left.
The number of blank rows vary between each product, I have about six thousand products over about 20,000 lines
APOLOGIES I HAD FORMATTED THE TABLE BELOW TO LINE UP, BUT IT HASN'T WORKED.
Here is a link to a sample file if my description doesn't make sense.
http://www.creativepartnershosting.com/excel/CopyPasteDataSample.xls
Column A, Column B, Column C, Column D, Column E, Column F,
Row 1 45879645, DescrT, ColourJ, SizeIO, SupplierFE, TelephoneK,
BLANK ROWS
Row 6 45879122, DescrG, ColourR, SizeJ, SupplierW, TelephoneL,
BLANK ROWS
Row 9 58794512, DescrR, ColourH, SizeW, SupplierK, TelephoneP,
BLANK ROWS
Row 16 56987456, Descr16, Colour16, Size16, Supplier16, Telephone16,
BLANK ROWS
Row 19 54268747, Descr1G, ColourY, SizeP, SupplierS, TelephoneK,
Any assistance would be really appreciated.
Many thanks
Last edited: