+ Reply to Thread
Results 1 to 2 of 2

automatically insert 8 blank rows between each record

  1. #1
    Evad
    Guest

    automatically insert 8 blank rows between each record

    I am trying to insert 8 blank rows in between all records in my spreadsheet.
    Any suggestions using macros,etc.

    Thanks

  2. #2
    Ken Johnson
    Guest

    Re: automatically insert 8 blank rows between each record

    Hi Evad,
    Try this macro (on a backup copy first)...

    Public Sub EightRowsTween()
    Application.ScreenUpdating = False
    Dim iLastRow As Long
    Dim rngLastRow As Range
    iLastRow = ActiveSheet.UsedRange.Rows.Count
    Do While iLastRow > 1
    Set rngLastRow = Range(Cells(iLastRow, 1), _
    Cells(iLastRow + 7, 1))
    rngLastRow.EntireRow.Insert
    iLastRow = iLastRow - 1
    Loop
    End Sub

    If you ever need to insert a different number of rows between all
    records you can change the 7 in the 5th last line eg for 5 rows between
    records change the 7 to 4 (always 1 less than the number of inserted
    rows)

    Ken Johnson


+ 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