Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2005
    Posts
    18

    Unanswered: Insert Multiple Rows

    The following code works great to insert 2 rows in a spreadsheet

    Code:
    Sub RowInsert()
    
    For x = 2 To 12000
    Rows(x & ":" & x + 1).Select
    Selection.Insert Shift:=xlDown
    x = x + 2
    Next x
    
    End Sub
    How can I change it to insert 49 rows?

  2. #2
    Join Date
    Apr 2008
    Posts
    6
    Code:
    Sub RowInsert()
    
    For x = 2 To 12000
    Rows(x & ":" & x + 48).Select
    Selection.Insert Shift:=xlDown
    x = x + 49
    Next x
    
    End Sub

  3. #3
    Join Date
    Nov 2005
    Posts
    18
    Works great! Thanks!

Posting Permissions

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