+ Reply to Thread
Results 1 to 4 of 4

Insert Multiple Rows

  1. #1
    Registered User
    Join Date
    12-01-2004
    Posts
    5

    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.

  2. #2
    Forum Expert swatsp0p's Avatar
    Join Date
    10-07-2004
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2010
    Posts
    1,545
    Edited to meet your needs; originally from Ron de Bruin:
    Quote Originally Posted by Ron de Bruin

    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
    Bruce
    The older I get, the better I used to be.
    USA

  3. #3
    Registered User
    Join Date
    12-01-2004
    Posts
    5
    Thanks for the help. That worked great.

  4. #4
    Forum Expert swatsp0p's Avatar
    Join Date
    10-07-2004
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2010
    Posts
    1,545
    Ron did the work. I just pointed you his way...

    Glad it worked for you!

    Cheers.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1