+ Reply to Thread
Results 1 to 4 of 4

Insert new row between rows

Hybrid View

triaji Insert new row between rows 12-02-2010, 05:52 AM
TMS Re: Insert new row between... 12-02-2010, 06:20 AM
watersev Re: Insert new row between... 12-02-2010, 06:30 AM
triaji Re: Insert new row between... 12-02-2010, 07:01 AM
  1. #1
    Registered User
    Join Date
    11-03-2010
    Location
    Jakarta
    MS-Off Ver
    Excel 2007
    Posts
    63

    Arrow Insert new row between rows

    Dear forum,
    How create macro for insert row in every data?
    please find the attachment for more details.
    Thank you very much
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,596

    Re: Insert new row between rows

    One way, try:

    Option Explicit
    Sub InsertRows()
    Dim lLRow As Long
    Dim lLC As Long
    lLRow = Range("A2").End(xlDown).Row
    For lLC = lLRow To 4 Step -1
        Range("A" & lLC).EntireRow.Insert shift:=xlDown
    Next 'lLC
    End Sub

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Insert new row between rows

    Sub Insr()
    Dim i As Long: Application.ScreenUpdating = False
    For i = [a3].End(xlDown).Row To 4 Step -1
          If Cells(i, 1) <> "" Then Cells(i, 1).EntireRow.Insert shift:=xlDown:
    Next: End Sub
    or check attached file, run macro "Insr"
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    11-03-2010
    Location
    Jakarta
    MS-Off Ver
    Excel 2007
    Posts
    63

    Re: Insert new row between rows (SOLVED)

    Thank you very much... you both are great,master

+ 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