Flagging a row based on it being the original entry
I have a sheet that is populated through a form. My employees look at many files a day and some are duplicates from the same day, previous days, weeks, or months. I want only the original file to count in my tally, so I am trying to build a formula that will automatically mark or flag the subsequent file(s) as duplicate based on the entry date.
My submission form captures the File#, Date/Time stamp, and additional information.
Best Answer
-
Hi, @Kenneth Wittich
Try...
=IF([Date/Time stamp]@row = MIN(COLLECT([Date/Time stamp]:[Date/Time stamp], [File#]:[File#], [File#]@row)),"This is the oldest entry.", "Nope")
The formula assumes that the timestamp for each row will be different.
The approach...
COLLECT() all of the timestamps from the timestamp column where the File# are the same as the File# at the current row. Then find the minimum (oldest) timestamp. If the timestamp for the current row is the same as the minimum timestamp, then the current row must be the oldest for that set of File#.
COLLECT([Date/Time stamp]:[Date/Time stamp], [File#]:[File#], [File#]@row)
Now get the oldest timestamp...
MIN(COLLECT([Date/Time stamp]:[Date/Time stamp], [File#]:[File#], [File#]@row))
Apply the logic...
IF([Date/Time stamp]@row = MIN(COLLECT([Date/Time stamp]:[Date/Time stamp], [File#]:[File#], [File#]@row)),"This is the oldest entry.", "Nope")
Hope this helps!
Answers
-
Hi, @Kenneth Wittich
Try...
=IF([Date/Time stamp]@row = MIN(COLLECT([Date/Time stamp]:[Date/Time stamp], [File#]:[File#], [File#]@row)),"This is the oldest entry.", "Nope")
The formula assumes that the timestamp for each row will be different.
The approach...
COLLECT() all of the timestamps from the timestamp column where the File# are the same as the File# at the current row. Then find the minimum (oldest) timestamp. If the timestamp for the current row is the same as the minimum timestamp, then the current row must be the oldest for that set of File#.
COLLECT([Date/Time stamp]:[Date/Time stamp], [File#]:[File#], [File#]@row)
Now get the oldest timestamp...
MIN(COLLECT([Date/Time stamp]:[Date/Time stamp], [File#]:[File#], [File#]@row))
Apply the logic...
IF([Date/Time stamp]@row = MIN(COLLECT([Date/Time stamp]:[Date/Time stamp], [File#]:[File#], [File#]@row)),"This is the oldest entry.", "Nope")
Hope this helps!
-
Thank you! That was very helpful and worked perfectly!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!