+ Reply to Thread
Results 1 to 6 of 6

Macro to copy above row and insert copied row based on value

  1. #1
    Registered User
    Join Date
    03-09-2012
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    41

    Macro to copy above row and insert copied row based on value

    I am looking for a macro that will look for a value in column P ("ADD") and copy the row above and insert copied cells down below the copied row.

    This will have to be looped until there are no remaining instances in that column.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    03-09-2012
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Macro to copy above row and insert copied row based on value

    I have this for Delete of rows based on value:


    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Macro to copy above row and insert copied row based on value

    try this
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    03-09-2012
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Macro to copy above row and insert copied row based on value

    Thats almost it. It loops through once, but needs to keep looping back through until no "ADD"s

    For example: in my file, delete rows 8 and 9. Run the macro - it performs for the first, but as you can see with my formula in the cell, there is still an "add" in the column.

    I need to keep looping through until all rows are copied down and the "add" is gone.

  5. #5
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Macro to copy above row and insert copied row based on value

    eliminate
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    03-09-2012
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Macro to copy above row and insert copied row based on value

    That worked. Thank you for your help!

+ 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