+ Reply to Thread
Results 1 to 8 of 8

Find duplicates, copy one of each to another sheet

  1. #1
    Registered User
    Join Date
    06-23-2014
    Location
    France
    MS-Off Ver
    2010
    Posts
    18

    Find duplicates, copy one of each to another sheet

    Hi!
    I'm supposed to find duplicates in sheet_1 Q6:Q251 and copy one of each to sheet_2 D6:D243 as well as unique values from the same column.
    In a sheet_1 B6:B251 I have values related to Q6:Q251 and I have to copy each of them to sheet_2, E6:I6 in the same row as the related duplicate (I'll have max 5 duplicates).
    Is this even possible?
    You can find attached simple example of what should be the result (sheet_2)

    Thank you in advance!
    Attached Files Attached Files
    Last edited by Jele007; 06-24-2014 at 08:24 AM. Reason: orthography

  2. #2
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Find duplicates, copy one of each to another sheet

    It shouldn't be a problem, but I find your request unclear, and the data in the attachment doesn't match up with anything you are talking about.
    Acts 4:12
    Salvation is found in no one else, for there is no other name under heaven given to mankind by which we must be saved.

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Find duplicates, copy one of each to another sheet

    Hello Jele007,

    The attached workbook contains the macro below. A button has been added to "Feuil1" to run the macro.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Registered User
    Join Date
    06-23-2014
    Location
    France
    MS-Off Ver
    2010
    Posts
    18

    Re: Find duplicates, copy one of each to another sheet

    I have some confidential data and I can't attach the original file, but here is a part of it (modified)
    I'll try to be more clear: I have to copy values from sheet_1 column R in sheet_2 column D, but without repeating the duplicates. I should copy as well unique values as you can see in the attached file. In sheet_1 column G I have values related to column R and these values should be copied to sheet_2. How in sheet_1 I want to have only one copy of each duplicate the values from G should be copied in the same line in sheet_2 (from E6:I6, cos I'll have max 5 duplicates).
    Sheet_2 is what normally I should obtain automatically...
    If it's still not clear just say...
    Attached Files Attached Files
    Last edited by Jele007; 06-24-2014 at 02:31 PM.

  5. #5
    Registered User
    Join Date
    06-23-2014
    Location
    France
    MS-Off Ver
    2010
    Posts
    18

    Re: Find duplicates, copy one of each to another sheet

    @ Leith Ross

    Thanks a lot, I'm gonna try immediately

  6. #6
    Registered User
    Join Date
    06-23-2014
    Location
    France
    MS-Off Ver
    2010
    Posts
    18

    Re: Find duplicates, copy one of each to another sheet

    @ Leith Ross

    Not working in my original file don't know why

  7. #7
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Find duplicates, copy one of each to another sheet

    Hello Jele007,

    The macro was written based on the example you posted. If the workbook the macro is installed in is different from the posted workbook then the macro will need to adjusted for that workbook. To make the adjustments I would need to see the workbook you are currently using.

    If the workbook contains sensitive data then you can create an expurgated copy for posting. If that is not satifiactory then the only other option would be emailing me a copy for review.

  8. #8
    Registered User
    Join Date
    06-23-2014
    Location
    France
    MS-Off Ver
    2010
    Posts
    18

    Re: Find duplicates, copy one of each to another sheet

    Hello everyone,

    I'm STILL struggling with this code. Leith solved the problem but I don't understand the code enough to apply it on my original workbook. I've tried to change the names of the sheets and the range of columns but it's not working. This time I attached the blank workbook, same as the one I use. The data I have to copy is on the sheet 'SUIVI_DEVIS'. Duplicates are in the column Q and related data in the columns F and R. All this should be copied to sheet 'ORDRES DE SERVICE' (as you can see I've entered data manually, after entering the code I should obtain all that directly). I would really really appreciate if someone could help me!
    Attached Files Attached Files

+ 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] Find Duplicates on 2 different sheets & copy
    By Burt_100 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-11-2013, 01:34 PM
  2. [SOLVED] Find duplicates in colA in one sheet and write them in another sheet with row reference
    By Masun in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 03-02-2013, 06:23 PM
  3. [SOLVED] help find duplicates in two worksheets, copy to a third..
    By eighty2scrambler in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-27-2012, 03:00 PM
  4. [SOLVED] On selection, find dups in two colums across workbook, copy duplicates to existing sheet.
    By Joshuarat in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-21-2012, 07:54 PM
  5. find duplicates, and copy the first duplicate
    By Caseyv in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-14-2010, 10:56 AM

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