+ Reply to Thread
Results 1 to 3 of 3

Help with a macro that flags duplicates with different values

  1. #1
    Registered User
    Join Date
    09-30-2019
    Location
    Chicago
    MS-Off Ver
    2016
    Posts
    72

    Help with a macro that flags duplicates with different values

    Hi All,

    I've been racking my brain on how I can do this but I just can't seem to figure it out. I've attached an excel spreadsheet for you all to look at.

    Basically, I have a list of names/primary keys and they have 4 values associated with them on each line: Day 1,2,3 and 4.

    What I need is to be able to flag duplicates in the Name column but whose values don't match across each day. So if day 1 on John's first line = day 1 on John's second and third and fourth line etc. then we are good. I would also want to do the same for day 2, 3 and 4. So, if John's Day 1= Day 1, Day 2=Day2, and so on, across all of his rows, then I DON'T want to flag John.

    What I DO want to flag is when the person's days don't match across all rows. So, for example, Jesse would be flagged because their day 1 doesn't = day 1 across all lines. I want to flag if ANY of the days don't match across all rows. so if day 1,2,3 all matched but day 4 didn't I'd want to flag that.

    I've racked my brain on how to do this with a formula but I can't figure it out. I don't care if it's done with a formula or a macro but I just need help!

    PLEASE SOMEONE
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Help with a macro that flags duplicates with different values

    G2 =B3&C3&D3&E3&F3 and drag down

    H2 =Countif($G$3:$G$17,G3) and drag down

    Then filter on column H and select 2 and 3 (the values who are duplicated).

    See the attached file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Help with a macro that flags duplicates with different values

    Hi armando,

    Try the below code based on your sample file

    Please Login or Register  to view this content.
    Last edited by nankw83; 05-22-2020 at 06:12 PM. Reason: Small correction in the code
    If I was able to help, you can thank me by clicking the * Add Reputation under my user name

+ 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] Macro to find duplicates, concatenate Unique Values, then delete old duplicates
    By lesoies in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-17-2013, 04:32 PM
  2. Update to Macro to find duplicates, concatenate Unique Values
    By lesoies in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-10-2013, 06:35 PM
  3. [SOLVED] Need a Macro to sum the values then delete the duplicates
    By plt393 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-14-2013, 04:07 PM
  4. Macro for Error Flags
    By galatians220 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-12-2012, 07:27 AM
  5. Need Macro which identifies duplicates in a column and colors the duplicate values
    By Karthik Sen in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-07-2012, 01:59 PM
  6. Replies: 6
    Last Post: 03-29-2012, 12:16 AM
  7. Macro to remove duplicates values and keep unique values bases on multiple criteria
    By Ricker090 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-16-2011, 04:37 PM
  8. Macro - Remove Duplicates and Lower Values
    By allblack in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-22-2010, 07:58 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