![]() |
Insert Multiple Rows
I am working with a spreadsheet that has about 1000 rows of data in it. I need to insert 14 rows between each current record. I know this can be done using a numbering system and then sorting the page, but I am having trouble getting excel to recognize the counting pattern. Any help would be great. -- ucf1020 ------------------------------------------------------------------------ ucf1020's Profile: http://www.excelforum.com/member.php...o&userid=17055 View this thread: http://www.excelforum.com/showthread...hreadid=480678 |
Insert Multiple Rows
Edited to meet your needs; originally from Ron de Bruin:Ron de Bruin Wrote: Try this one Sub test() Application.ScreenUpdating = False Dim numRows As Integer Dim R As Long Dim rng As Range numRows = 14 Set rng = ActiveSheet.UsedRange For R = rng.Rows.Count To 1 Step -1 rng.Rows(R + 1).Resize(numRows).EntireRow.insert Next R Application.ScreenUpdating = True End Sub -- Regards Ron de Bruin http://www.rondebruin.nl -- swatsp0p ------------------------------------------------------------------------ swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101 View this thread: http://www.excelforum.com/showthread...hreadid=480678 |
Insert Multiple Rows
Thanks for the help. That worked great. -- ucf1020 ------------------------------------------------------------------------ ucf1020's Profile: http://www.excelforum.com/member.php...o&userid=17055 View this thread: http://www.excelforum.com/showthread...hreadid=480678 |
Insert Multiple Rows
Ron did the work. I just pointed you his way... Glad it worked for you! Cheers. -- swatsp0p ------------------------------------------------------------------------ swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101 View this thread: http://www.excelforum.com/showthread...hreadid=480678 |
All times are GMT +1. The time now is 04:42 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com