+ Reply to Thread
Results 1 to 3 of 3

Three columns of data, keep only latest dated row

  1. #1
    Registered User
    Join Date
    02-15-2011
    Location
    ny, USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Three columns of data, keep only latest dated row

    I've looked on the forum to see if I could find a solution. Sorry if it's already been asked as I could only find answers for two columns using =max

    I have a worksheet with:
    col 1, col2, col3
    Name, Class, Class Date

    I want to keep rows that have the same Name, and Class Fields but only keep the newest date. a pivot table isn't really acceptable for this.

    here's an example:

    joe, class 1, 01/01/11
    joe, class 2, 01/02/11
    joe, class 1, 02/01/11

    and extract so that only the newest date apears
    joe, class 2, 01/02/11
    joe, class 1, 02/01/11

    Thanks,
    -j

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Three columns of data one is the date

    In a new column add a helper formula, for example,

    Assuming your data is in A2:C20, then in D2 enter formula:

    =IF(OR(A2="",C2=MAX(IF($A$2:$A$20=A2,IF($B$2:$B$20=B2,$C$2:$C$20)))),"","x")

    and confirm it with CTRL+SHIFT+ENTER not just ENTER so that { } brackets appear around it.

    Then copy it down.

    All the rows marked with and "x" should be the ones to delete.

    Now, assuming you have headers in row 1, while you have any occupied cell in the range active, go to Data and click the Filter funnel.

    Select the "x" from the drop down arrow at the top of column D and delete these rows..

    Click the filter funnel again to remove filtering...
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    02-15-2011
    Location
    ny, USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Three columns of data, keep only latest dated row

    Great.. that worked perfectly.. exactly what I was looking for..

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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