Remove duplicates based on Modified Date

Options

Hi team, any suggestion is appreciated!
I have 4 sheets:

  • Sheets A-C: Individual project trackers
  • Sheet D: Main project sheet

What I need: Setting up a workflow that copies row updates in Sheets A-C over to the Main Sheet (Sheet D). This will ensure the Main Sheet includes all project statuses so I can report on them.


Current Status: In the Main Sheet (sheet D), I also want to set up a workflow where if a new row comes in with an existing ProjectID, the row with the older Modified Date gets moved to an Archive Sheet. This keeps only the latest status in the Main Sheet.


Problem: When a project is updated in the Individual Tracker sheets (A-C) and the row gets copied to the Main Sheet (D): A new row is created with the same ProjectID. Modified Date for all rows with that ProjectID is updated to the latest. Therefore, I can’t move older records out based on the Modified Date.

Does anyone know how to solve this problem or have suggestions for a better implementation?

Answers

  • SoS | Dan Palenchar
    SoS | Dan Palenchar ✭✭✭✭✭✭
    edited 07/04/24
    Options

    Hello @zdy520kobe,

    When you say "report on" what exactly do you mean? You might not need to get all of the rows into one single Sheet. As far as getting a roll up to see the status of all of your projects at once you have some options:

    Option 1: Control Center Summary Sheet

    If you have Control Center you can easily do this by making a Portfolio Summary Sheet with Status as a profile data field.

    Option 2: Report on your Project Sheets

    Whether or not you have Control Center you could also generate a Report and see all of your project Status at a glance.

    If the projects are in one Workspace set the Report scope to that workspace (see the video below on how to do this).

    If the projects are in separate workspaces you can:

    1. Use Dynamic Report w/ Control Center (though redundant w/ Blueprint Summary), OR
    2. If you don't have Control Center you will have to update the report manually to include/exclude projects as they start/finish (so in this case, easier to have them in one workspace).

    Option 3: Identify most recent project row in database and push to report

    If you want to maintain your current architecture an easier solution than removing the duplicates would probably be to use a formula to identify the most recent project row. I'm going to assume their is a column in your Sheet called Project ID that is unique for the project in question. You can use a formula to check if the Created value in a particular row is equal to the most recent Created values for all instances of the Project ID in that row. The formula below will do this and is meant to go into a checkbox column, it will check the boxes for all of the Project IDs that were added most recently.

    =IF([Created]@row = MAX(COLLECT([Project ID]:[Project ID], Created:Created, Created@row)), 1)

    You can then make a report and filter it based on that checkbox being checkd.

    Option 4: Implement Automatic Duplicate Removal Solution

    Removing duplicates automatically is actually pretty complex, I did figure out a solution for this that you can see in the video below. This will show you how to use a series of formulas and automations to dynamically identify and remove duplicate rows… it's a set it and forget it solution but might take some setup and adjustment to your Sheet structure.

    Hope this helps!

    If this helped, help me & the SSC by accepting it and reacting w/💡insightful, ⬆️ Vote Up, and/or ❤️Awesome.

    👨🏼💻 Dan Palenchar | School of Sheets Solutions Consulting | Smartsheet Aligned Gold Partner

    PS - If you have a follow up response use @Dan Palenchar so I get notified of your reply!

    I make YouTube videos answering community questions: see if yours is on the list here!

  • zdy520kobe
    Options

    Wow, thank you so much Dan! I will try these solutions out!

  • zdy520kobe
    edited 07/05/24
    Options

    Hi Dan @dan palenchar, I tried Option3 as it aligns with my current flow. But the formula keeps throwing an error as " Invalid Operation". I tried change the "=" to "<" to find the older time as well, but it did not work. Would you please advise?

  • zdy520kobe
    Options

    Hi Dan @Dan Palenchar, thank you for your suggestions! I tried option 3 as it aligns with my current flow. But when I input the formula, it keeps throwing an error as " Invalid Operation". I tried to change the "=" to "<" to flag out the older entries, but it did not work. Would you please advise?

  • SoS | Dan Palenchar
    SoS | Dan Palenchar ✭✭✭✭✭✭
    Options

    Whoops I made a mistake, try

    =IF([Created]@row = MAX(COLLECT(Created:Created, [Project ID]:[Project ID], [Project ID]@row)), 1)

    @zdy520kobe

    If this helped, help me & the SSC by accepting it and reacting w/💡insightful, ⬆️ Vote Up, and/or ❤️Awesome.

    👨🏼💻 Dan Palenchar | School of Sheets Solutions Consulting | Smartsheet Aligned Gold Partner

    PS - If you have a follow up response use @Dan Palenchar so I get notified of your reply!

    I make YouTube videos answering community questions: see if yours is on the list here!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!