+ Reply to Thread
Results 1 to 3 of 3

Inserting Rows

  1. #1
    GOL
    Guest

    Inserting Rows

    I have a spreadsheet with about 1,000 rows of customer contacts. I need to
    insert 4 blank rows between each record for more information (End up being
    5,000 rows total). Is there a way to do this automatically without having to
    insert row after row in between each record?

  2. #2
    Ron de Bruin
    Guest

    Re: Inserting Rows

    Hi GOL

    Try this one

    Sub test()
    Application.ScreenUpdating = False
    Dim numRows As Integer
    Dim R As Long
    Dim rng As Range
    numRows = 4
    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


    "GOL" <GOL@discussions.microsoft.com> wrote in message news:E4AE8351-F5AC-443B-8E11-78EE874A13CC@microsoft.com...
    >I have a spreadsheet with about 1,000 rows of customer contacts. I need to
    > insert 4 blank rows between each record for more information (End up being
    > 5,000 rows total). Is there a way to do this automatically without having to
    > insert row after row in between each record?




  3. #3
    GOL
    Guest

    Re: Inserting Rows

    THANKS!!!!!!

    "Ron de Bruin" wrote:

    > Hi GOL
    >
    > Try this one
    >
    > Sub test()
    > Application.ScreenUpdating = False
    > Dim numRows As Integer
    > Dim R As Long
    > Dim rng As Range
    > numRows = 4
    > 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
    >
    >
    > "GOL" <GOL@discussions.microsoft.com> wrote in message news:E4AE8351-F5AC-443B-8E11-78EE874A13CC@microsoft.com...
    > >I have a spreadsheet with about 1,000 rows of customer contacts. I need to
    > > insert 4 blank rows between each record for more information (End up being
    > > 5,000 rows total). Is there a way to do this automatically without having to
    > > insert row after row in between each record?

    >
    >
    >


+ 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