+ Reply to Thread
Results 1 to 4 of 4

Adding rows within a list

  1. #1
    Registered User
    Join Date
    01-09-2006
    Posts
    5

    Adding rows within a list

    I have a long list with no spaces, all in one column. I am trying to add 7 blank lines in between each row. What is the easiest way to achieve this?

    Thanks in advance

  2. #2
    Registered User
    Join Date
    02-10-2006
    Posts
    20

    Insert row

    Hi

    Try the following (I named my list Test)

    Dim r As Object
    Dim intCount As Integer
    intCount = 1

    For Each r In Range("Test")
    If r.Value = "" Then

    Else
    r.Offset(1, 0).Select
    intCount = 1
    Do Until intCount > 7
    Selection.EntireRow.Insert
    intCount = intCount + 1
    Loop
    End If

    Next r

  3. #3
    Ron de Bruin
    Guest

    Re: Adding rows within a list


    Hi nihad

    Try this macro

    Sub test()
    Application.ScreenUpdating = False
    Dim R As Long
    Dim rng As Range
    Set rng = ActiveSheet.UsedRange
    For R = rng.Rows.Count To 1 Step -1
    rng.Rows(R + 1).Resize(7).EntireRow.insert
    Next R
    Application.ScreenUpdating = True
    End Sub

    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "nihad" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I have a long list with no spaces, all in one column. I am trying to
    > add 7 blank lines in between each row. What is the easiest way to
    > achieve this?
    >
    > Thanks in advance
    >
    >
    > --
    > nihad
    > ------------------------------------------------------------------------
    > nihad's Profile: http://www.excelforum.com/member.php...o&userid=30285
    > View this thread: http://www.excelforum.com/showthread...hreadid=515389
    >




  4. #4
    Ardus Petus
    Guest

    Re: Adding rows within a list

    Sub SpaceSeven()
    Dim irow As Long
    For irow = Cells(Rows.Count, "A").End(xlUp).Row To 2 Step -1
    Rows(irow).Resize(7).Insert shift:=xlDown
    Next irow
    End Sub


    HTH

    --
    AP

    "nihad" <[email protected]> a écrit dans le
    message de news:[email protected]...
    >
    > I have a long list with no spaces, all in one column. I am trying to
    > add 7 blank lines in between each row. What is the easiest way to
    > achieve this?
    >
    > Thanks in advance
    >
    >
    > --
    > nihad
    > ------------------------------------------------------------------------
    > nihad's Profile:

    http://www.excelforum.com/member.php...o&userid=30285
    > View this thread: http://www.excelforum.com/showthread...hreadid=515389
    >




+ 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