+ Reply to Thread
Results 1 to 2 of 2

Keep or Remove data (duplicates) based on time of entry?

  1. #1
    Forum Contributor
    Join Date
    02-03-2020
    Location
    Wisconsin
    MS-Off Ver
    365
    Posts
    150

    Keep or Remove data (duplicates) based on time of entry?

    Good Morning.

    I paste a set of data into a worksheet every day - every day there are duplicates. Is there a way that I can remove duplicates, but keep the data that I pasted today?

    For example

    Order 1........has dozens of columns of information. This was pasted onto the worksheet yesterday
    Order 1........has dozens of columns of information. But this was pasted onto the worksheet today

    I want to keep the one that was pasted today. There is no way to sort by the current columns that guarantees I keep today's data. Does anyone know if there is some sort of timestamp function that would allow it or another way to make this happen?

    Thanks.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,613

    Re: Keep or Remove data (duplicates) based on time of entry?

    indeed, when you have a timestamp column, you can sort your data descending on dates (newest first) and then remove duplicates (using all or some of the data columns, but not using timestamp column).

    To automatically add timestamp to added data you could use a macro - namely Worksheet_Change event handler - there are many examples on the forum and in the web. I will not try to write next one, especially as we don't know your data layout and where could be this extra column (for timestamp) located. See for instance https://www.excelforum.com/excel-pro...-the-code.html

    The second idea (also VBA based) would be to use the same event and not write timestamp but automatically remove data (from the set preexisting in a worksheet) which is duplicated in newly pasted rows.
    Best Regards,

    Kaper

+ 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 remove duplicates based on a value between 2 worksheets - then move data
    By vg05 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-20-2022, 11:52 AM
  2. Remove duplicates based upon a period of time
    By Richard Ninetoes in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-15-2019, 06:12 PM
  3. Remove Duplicates based on Date/Time
    By legolas85 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-12-2018, 08:04 AM
  4. Remove Un-Needed Rows Based on Time Entry Type
    By thomasjm99 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-31-2017, 03:38 PM
  5. Remove duplicates and keep oldest entry
    By Bond007 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-11-2014, 12:22 PM
  6. [SOLVED] Find Duplicates and remove the duplicate entry comparing two columns
    By retrospikz in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-04-2013, 03:17 AM
  7. [SOLVED] Remove rows based on duplicates in certain columns, and merge data from another column
    By yanagi600 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 01-02-2013, 04:17 PM

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