+ Reply to Thread
Results 1 to 4 of 4

Macro to Copy down and insert line continously

  1. #1
    Registered User
    Join Date
    08-26-2010
    Location
    Poplar Bluff MO
    MS-Off Ver
    Excel 2016
    Posts
    98

    Macro to Copy down and insert line continously

    I have a spreadsheet that I need to copy row 1, insert a line in row 2 and paste the contents from row 1. Then I need it to copy row 3, insert a line and paste it in row 4. I will need to do this continually, until there are no lines left.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Macro to Copy down and insert line continously

    I guess it will be better understood if you attach a sample file.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    08-26-2010
    Location
    Poplar Bluff MO
    MS-Off Ver
    Excel 2016
    Posts
    98

    Re: Macro to Copy down and insert line continously

    Here is a sample file. I have already copied the row 1 and row 2, now I need it to continue on and copy row 5 and insert a line in row 6 and paste the contents from row 5 into row 6. Then it would copy row 7 and insert a row into row 8 and paste those cells.
    Attached Files Attached Files

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro to Copy down and insert line continously

    Fastest way... since there is a UNIQUE value in column N....

    1) Copy all the data at once, paste below the original data at row 20
    2) Highlight all the data
    3) Sort the data by column N



    Here's a macro version of that:
    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 02-09-2012 at 02:25 PM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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