Results 1 to 5 of 5

insert two empty rows below used data

Threaded View

johncena insert two empty rows below... 06-30-2010, 11:44 AM
Leith Ross Re: insert two empty rows... 06-30-2010, 01:36 PM
johncena Re: insert two empty rows... 07-01-2010, 12:12 AM
Leith Ross Re: insert two empty rows... 07-01-2010, 02:27 AM
johncena Re: insert two empty rows... 07-01-2010, 05:49 AM
  1. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: insert two empty rows below used data

    Hello johncena,

    I have add the macro below to the attached workbook. There is a button above "Date" in column 1 to run the macro.
    Sub Add2Rows()
    
      Dim R As Long
      Dim Rng As Range
      Dim RngEnd As Range
      Dim Wks As Worksheet
      
        Set Wks = Worksheets("Sheet1")
        
        Set Rng = Wks.Range("A2")
        Set RngEnd = Wks.Cells(Rows.Count, Rng.Column).End(xlUp)
        
        If RngEnd.Row < Rng.Row Then Exit Sub
        
        Set Rng = Wks.Range(Rng, RngEnd)
        
        Application.ScreenUpdating = False
        
          For R = Rng.Rows.Count To 2 Step -1
            Rng.Rows(R).Resize(RowSize:=2).EntireRow.Insert
          Next R
        
        Application.ScreenUpdating = True
        
    End Sub
    Attached Files Attached Files

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