+ Reply to Thread
Results 1 to 6 of 6

copy, offset, paste, then delete loop

  1. #1
    Registered User
    Join Date
    10-28-2015
    Location
    BFE, USA
    MS-Off Ver
    2010
    Posts
    30

    copy, offset, paste, then delete loop

    I need serious help, not sure what to do first and I'm not sure what would be the most efficient, but the end result is: delete the duplicate ID number in column A, entire row delete, copy the number below the original ID number and move that number next to the original number in column B. (There's other data in the other columns but are of no consequence). The pattern is ID, amount, Duplicate ID. I need to keep ID and amount. Not sure if I should delete every 3 row first. Any help will be greatly appreciated. I've attached a worksheet and hope this makes sense.
    thank you in advance for your assistance.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: copy, offset, paste, then delete loop

    The duplicates have to be seen from the beginning , is it?
    It means the first occurance is data to keep
    Last edited by PCI; 05-22-2018 at 10:51 PM.
    - Battle without fear gives no glory - Just try

  3. #3
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: copy, offset, paste, then delete loop

    Can we say that that "key" have "-" inside ?
    Last edited by PCI; 05-22-2018 at 10:51 PM.

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: copy, offset, paste, then delete loop

    Is it what you want ...?
    See next code, much be launch from sheet with data
    Take care that original data is deleted
    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: copy, offset, paste, then delete loop

    Quote Originally Posted by Spyderwoman View Post
    ... Not sure if I should delete every 3 row first ...
    From row "506" to "554", the data does not retain the correct pattern.
    What to do in this case ?

  6. #6
    Registered User
    Join Date
    10-28-2015
    Location
    BFE, USA
    MS-Off Ver
    2010
    Posts
    30

    Re: copy, offset, paste, then delete loop

    wow, you are good, this works great, many thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Loop worksheets Copy range and Paste in LastUsedCell in first worksheet, delete Worksheet
    By Simone Fick in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-24-2017, 10:01 AM
  2. Filtered Data Loop, Copy and Paste into New Workbook, delete first column and save
    By newbiegirl3113 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-20-2016, 03:44 AM
  3. [SOLVED] Copy dynamically changing column and Paste using VBA Loop (Loop within Loop)
    By nixon72 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-12-2013, 12:46 PM
  4. Loop to find a cell, then copy offset paste
    By mr.alexander in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-29-2013, 08:48 AM
  5. [SOLVED] Loop through entire sheet, Insert row, copy row data, paste row data, delete row
    By Hyperdude in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-19-2012, 01:46 AM
  6. [SOLVED] Running a loop and copying and paste seperate rows offset by one
    By DannyJ in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-02-2012, 08:35 AM
  7. Loop Copy, Paste, Delete
    By johnsjg in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-07-2011, 02:05 PM

Tags for this Thread

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