+ Reply to Thread
Results 1 to 4 of 4

If the data is duplicate, then vlookup for the latest date of multiple data

  1. #1
    Registered User
    Join Date
    05-09-2014
    MS-Off Ver
    Excel 2003
    Posts
    1

    If the data is duplicate, then vlookup for the latest date of multiple data

    Hi,

    Say, there're multiple data randomly stored and trying to find the max data or latest date of the given data if data is duplicate.

    For example,

    A(Code) B(Date) C(Result)
    1 AO4201 20140218 ?
    2 AO4200 20140305 ?
    3 AO4200 20140218 ?
    4 AO4204 20140318 ?
    5 AO4200 20140422 ?

    > Find the Max value when the date is duplicate
    * Condition 1, Data will be continuously added below column A and B
    * Condition 2, It cannot change original data.

    AO4200 -
    AO4201 -
    AO4204 -

    >Expected result:
    AO4200 - 20140422
    AO4201 - n/a
    AO4204 - n/a


    To find the result, I tried to use the formula = If(countif(A1:B5,A1)>=2,Vlookup(A1,A1:B5,3,0),"n/a")

    I looked it up other's query, and some of them used Max, but in this case, I do not know where to put MAX, since vlookup function only gets the first value.
    Please help to solve it.

    Thanks,
    Nara

  2. #2
    Valued Forum Contributor Miroslav R.'s Avatar
    Join Date
    05-16-2013
    Location
    NMnV, Slovakia
    MS-Off Ver
    Excel 2007
    Posts
    479

    Re: If the data is duplicate, then vlookup for the latest date of multiple data

    Hi,
    look in my sample workbook, but in fact I used array formula:

    Please Login or Register  to view this content.
    Book1.xlsx

    Hope it works also for you... =)

    Regards

    M

  3. #3
    Valued Forum Contributor Saarang84's Avatar
    Join Date
    02-19-2009
    Location
    Chennai, India
    MS-Off Ver
    XL 2003 to 2010
    Posts
    812

    Re: If the data is duplicate, then vlookup for the latest date of multiple data

    Hi,

    Welcome to the forum.

    Miroslav's solution is almost correct. However, there is a small change required (it needs to be used as an array formula, confirmed by using Ctrl + Shift + Enter) to give the correct date :
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by Saarang84; 05-09-2014 at 06:13 AM.
    If my assistance has helped, there is a reputation icon * on the left hand corner below the post - you can show your appreciation to the user who has helped in resolving your requirement.

    If your requirement has been solved please mark your thread as Solved.
    In the menu bar above the very first post, select Thread Tools, then select "Mark this thread as Solved".

    Kindly use [FORMULA] or [CODE] tags when posting your code.

    Regards,
    Sarang

  4. #4
    Valued Forum Contributor Miroslav R.'s Avatar
    Join Date
    05-16-2013
    Location
    NMnV, Slovakia
    MS-Off Ver
    Excel 2007
    Posts
    479

    Re: If the data is duplicate, then vlookup for the latest date of multiple data

    Oh..I mentioned that in my post,but the formula was unfortunatelly posted without those array brackets.sorry for that

    Odoslané z C6603 pomocou Tapatalku
    Regards
    Miroslav R.

    (If You like my solutions, feel free to add reputation.)

+ 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] formula or vba help on vlookup to get latest date from multiple lookup value of SO's
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-16-2014, 09:48 AM
  2. [SOLVED] Getting the latest data and the corresponding year using Vlookup?Max functions?
    By xsiededios in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-20-2013, 04:56 AM
  3. Delete duplicate rows, but keep the cell that has the latest date
    By vaznlyfe in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-20-2012, 01:35 PM
  4. Replace duplicate with latest Date
    By dntel123 in forum Excel General
    Replies: 5
    Last Post: 11-30-2010, 01:36 PM
  5. Finding Latest Date and corresponding data
    By Kolacube in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-01-2008, 03:30 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