+ Reply to Thread
Results 1 to 5 of 5

VBA Macro to find duplicates from multiple columns

  1. #1
    Registered User
    Join Date
    09-10-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    18

    VBA Macro to find duplicates from multiple columns

    Dear everyone

    I have a workbook with multiple columns with differiating data. I would need to compare the values of Column A to every other column with data on it, and highlight duplicates. (Note, only column A should be used as a comparison value. So A should be compared with B C and D, but B should not be compared with C or D.

    Attached example workbook.

    Dummy1.xlsx

    So this is what my start setup looks like.

    User1 User2 User3 User4 User5
    X1 X1 X5 X4 R2
    Y2 Y2 R2 X3 Y2
    Y3 Y3 Y4 Y1 Y9
    X2 Y4 Y7 Y2 X1
    X3 Y5 Y3 Y7
    Y4 X2 X1
    Y5 X2
    X4 X4
    X5
    R2


    And this is what it should look like after running the macro


    User1 User2 User3 User4 User5
    X1 X1 X5 X4 R2
    Y2 Y2 R2 X3 Y2
    Y3 Y3 Y4 Y1 Y9
    X2 Y4 Y7 Y2 X1
    X3 Y5 Y3 Y7
    Y4 X2 X1
    Y5 X2
    X4 X4
    X5
    R2


    The purpose of this macro is to find values from columns B - XX, that aren't found in column A.
    As from this example, the values Y7 and Y9 were found.

    In the data workbook we're using, there's around 70 columns of data.

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: VBA Macro to find duplicates from multiple columns

    Give this a shot

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,629

    Re: VBA Macro to find duplicates from multiple columns

    Pl see the attached file with Macro.
    Attached Files Attached Files

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: VBA Macro to find duplicates from multiple columns

    @kvsrinivasamurthy
    Your comparing row to row

    Sorry tuppari I missed the hightlight, I thought you wanted it BOLDED

    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,629

    Re: VBA Macro to find duplicates from multiple columns

    See the attached file with changed Code.
    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)

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