+ Reply to Thread
Results 1 to 2 of 2

VBA macro worksheet copying/clearing duplicate entries

Hybrid View

  1. #1
    Registered User
    Join Date
    01-03-2013
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    5

    VBA macro worksheet copying/clearing duplicate entries

    Hi,

    I'm trying to create an excel file with a few different VBA macros in it. I had my own ideas on how to accomplish what I wanted done but found these forums to be a great place to get ideas or look at things differently. So I figured I'd post and see what people thought. Thanks in advance for any responses.

    There are two columns (A & B) of entered numbers. Periodically numbers are going to repeat between columns. What the worksheet needs to do is be able to separate the matched numbers and put them into a column. Then copy those numbers to a new column on a new sheet, before finally clearing column A & B of those duplicates (from both columns).

    What I have done so far through the use of VBA macros is make a button that when clicked clears column F and then copies all the duplicates from columns A & B into column F.

    What I have yet to figure out is how to make another macro/button that will copy column F from sheet1 to column A on sheet2 so that any new numbers in column F are copied to the same list/column on the next sheet in a long list (I don't want entries overwritten, I need data to be entered in the next empty cell). Also if possible I wanted to set it up so in the second column on sheet2 it would add the date the entry was copied over from sheet1.

    Finally, I wanted to set up a macro/button that when clicked would take those pairs of numbers that were added to column F initially and delete them from columns A & B. Both numbers (from each of the first two columns) should be cleared through this action.

    What ways can I do the above? I'm having trouble making them work properly.

    Thanks again.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: VBA macro worksheet copying/clearing duplicate entries

    try the new macros. What to do with the entries in column F after deleting the duplicates? I would suggest to flag them so they don't get copied again or delete them also.

    I would suggest to join the transfer of the duplicates to sheet2 and the deletion of duplicates buttons into 1
    Attached Files Attached Files
    Last edited by rcm; 01-10-2013 at 02:25 PM. Reason: further info

+ 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