+ Reply to Thread
Results 1 to 5 of 5

Vlookup finding most recent date

  1. #1
    Registered User
    Join Date
    02-13-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    7

    Vlookup finding most recent date

    Hi,
    I try to show most recent date in Sheet2 from Sheet1. I get N/A error. Please see file attached. Can figure out what is wrong.
    Thank you.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    04-01-2009
    Location
    Irvine, CA
    MS-Off Ver
    Excel 2010
    Posts
    280

    Re: Vlookup finding most recent date

    In the Vlookup you are trying to max the column reference and it is not found.
    Try this CSE Formula:

    =LARGE(IF(Sheet1!B1:B4=Sheet2!A1,Sheet1!C1:C4),1)

    Enter this in A2 then press Ctrl+Shift+Enter to get the brackets around it.

  3. #3
    Registered User
    Join Date
    05-06-2009
    Location
    Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    85

    Re: Vlookup finding most recent date

    You could also sort the list in sheet1 by date in descending order, that way the first date that the vlookup finds will be the most recent date.

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Vlookup finding most recent date

    A MAX array function would also work just as well:

    =MAX(IF(Sheet1!B:B=A1,Sheet1!C:C))

    After typing/editing that formula, press CTRL+SHIFT+ENTER. When done correctly, Excel will automatically insert braces, { }, around your formula. (Don't insert braces yourself.)

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Vlookup finding most recent date

    There is perhaps also the non-array alternative of:

    =MAX(INDEX((Sheet1!B1:B4=A1)*(Sheet1!C1:C4),0))

    (may be slower than an Array if used on very large data sets)

+ 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