+ Reply to Thread
Results 1 to 5 of 5

Duplicate Rows Merged based on Status

  1. #1
    Registered User
    Join Date
    11-09-2015
    Location
    Florida
    MS-Off Ver
    O365
    Posts
    67

    Duplicate Rows Merged based on Status

    Hi All:

    I'm hoping to get pointed in the right direction, but may be wishing for the moon. Attached is a sample...I've deleted some columns not relavent to this. Each person in the table is identified by a Member Code, but can be listed multiple times, with different statuses. I'd like to keep the row with the most info (dates, typically) and change the status following sort of hieracrchy.

    So, if a member Opted out, then that is the status of the row...If they renewed, and don't have a row with Opted out, then "Renewed is the status. If they have a row with Due to Renew and Renewed, then Renewed should be the status. Other rows can be removed. Hope this make sense and thanks for any guidance.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    01-25-2025
    Location
    Presov, Slovakia
    MS-Off Ver
    2021
    Posts
    284

    Re: Duplicate Rows Merged based on Status

    hi willhh3,
    test.
    Note: "1269-USR-03-P285F" is the same as "421345-CM-02-P413B", but the status is different in your output table. Why?
    m.s
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    11-09-2015
    Location
    Florida
    MS-Off Ver
    O365
    Posts
    67

    Re: Duplicate Rows Merged based on Status

    Good catch. The data comes 3 different reports that are merged into one table. Unfortunately, sometimes the data will overlap, meaning they may show in the Due to Renew report and the Opted Out report. It's ridicules, but this is the data I have and no control over the source. So the short answer is i type-o'd the output as I was trying to show all of the statuses.

    I think I've figured out some work arounds (Still tinkering), so if this is too complex don't waste your time. I figured it was a long shot. However if you do have a solution, I'd love to see it to further my knowledge. Thx!

  4. #4
    Forum Contributor
    Join Date
    01-25-2025
    Location
    Presov, Slovakia
    MS-Off Ver
    2021
    Posts
    284

    Re: Duplicate Rows Merged based on Status

    Have you tested the attached file? Did you click the "output" button?
    Is the output correct? If not, what should it be like?
    The code itself doesn't have to be complicated if clear conditions are defined.
    m.s.

  5. #5
    Registered User
    Join Date
    11-09-2015
    Location
    Florida
    MS-Off Ver
    O365
    Posts
    67

    Re: Duplicate Rows Merged based on Status

    Sorry, in my haste I didn't realize there was a sample with the code. I just looked at it and tested it against my sample data. Looks like it does the job! Technically, it's a little beyond my expertise, so I'm going to study it and step through it to gain understand. Marking as Solved and greatly appreciate the learning and follow-up.

+ 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. Hide rows based on status and dropdown list
    By maax555 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-17-2025, 11:16 AM
  2. [SOLVED] Removing duplicate rows based on single column duplicate values
    By Miasav90 in forum Excel General
    Replies: 7
    Last Post: 09-23-2021, 08:40 AM
  3. VBA - Transfer Rows based on drop down status
    By verokneeca in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-05-2016, 06:36 PM
  4. [SOLVED] Delete rows based on duplicate cell, but leaving first and last duplicate.
    By LadyNicole in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-28-2013, 05:07 AM
  5. Replies: 5
    Last Post: 03-16-2010, 07:05 AM
  6. Count number for rows, based on status
    By maximpinto in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-19-2009, 04:13 AM
  7. [SOLVED] Assign a particular colour to rows based on their current status
    By Co-op Bank in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-17-2006, 06:30 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