+ Reply to Thread
Results 1 to 4 of 4

Smarter "remove duplicates" function

  1. #1
    Registered User
    Join Date
    05-22-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    10

    Smarter "remove duplicates" function

    Hi,

    I have a spreadsheet that contains two columns, hotel and date.

    What I wanted to do was only keep the entry that has the latest date, and delete the duplicates.

    For example:

    Hotel Date
    123 1/01/2016
    123 2/01/2016
    123 3/01/2016
    abc 5/01/2016
    abc 6/01/2016
    abc 7/01/2016

    would look like

    Hotel Date
    123 3/01/2016
    abc 7/01/2016

    please advise!

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Smarter "remove duplicates" function

    so you want last date for each hotel

    Sort by date (Newest-Oldest)
    remove duplicates based on (hotel)
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Smarter "remove duplicates" function

    Enter formula in E2 and copy down

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    A
    B
    C
    D
    E
    1
    Hotel Date
    2
    123
    1/1/2016
    123
    3/1/2016
    3
    123
    2/1/2016
    abc
    7/1/2016
    4
    123
    3/1/2016
    5
    abc
    5/1/2016
    6
    abc
    6/1/2016
    7
    abc
    7/1/2016
    Sheet: Sheet3
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,933

    Re: Smarter "remove duplicates" function

    Here is a two step solution. In D2 down and over to column E paste:
    Please Login or Register  to view this content.
    In G2 down and over to column H paste this array formula (activate with Ctrl+Shift+Enter):
    Please Login or Register  to view this content.
    Here is your data with the formulas applied.
    Condensed Hotel List.xlsx
    Let me know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. Replies: 13
    Last Post: 10-22-2019, 02:14 AM
  2. [SOLVED] "Live" remove duplicates formula
    By TPDave in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-25-2015, 06:30 AM
  3. [SOLVED] VBA help needed to remove all "/" then replace with "-" from cell "B3"and "B5"
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-17-2014, 02:11 PM
  4. [SOLVED] Help needed to make "smarter" graphing macro
    By andrewsca in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-31-2012, 11:06 AM
  5. [SOLVED] Can't get the "Remove Duplicates" to work in a macro
    By anwaee2 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-15-2012, 01:17 AM
  6. Is there a smarter way than "IF" function to do this?
    By crni_vatreni in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-07-2011, 03:49 PM
  7. Efficient deduping without "Remove Duplicates"
    By Jbm444 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-25-2010, 05:24 PM

Tags for this Thread

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