+ Reply to Thread
Results 1 to 6 of 6

VLookup most recent entry

  1. #1
    Registered User
    Join Date
    05-26-2013
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    79

    Question VLookup most recent entry

    Hi All,

    I have tried doing a bit of research into this issue on this forum and others but I havent been able to find an answer that works for me. I need a function such as VLookup to look through a table of data and return a 'Dip' value based on the 'Code' as can be seen in the attached spreadsheet.

    The issue I have is I want excel to find the very last entry matching the lookup code and return the 'Dip' value for that. I could settle for something that goes off date except I may have multiple entries for that particular code on the same day, thus I require it to find just the last entry that matches.

    Pretty much I just need the lookup function to work from bottom to top rather than top to bottom of the table array. Can anyone provide some assistance on this?

    Vlookup Latest Value.xlsx

    Cheers,

    Spicey_888

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,596

    Re: VLookup most recent entry

    Here, use this:

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

  3. #3
    Registered User
    Join Date
    05-26-2013
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    79

    Re: VLookup most recent entry

    Awesome,

    Can you explain the syntax to this formula, Like how it works? I have a much larger and obviously more detailed sheet to apply it to.

    Cheers

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,596

    Re: VLookup most recent entry

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


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

    As TRUE/FALSE values: Does each value in B column is equal to value in J5.

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

    Will evaluate those TRUE/FALSE as (for example):

    1/{TRUE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE....}
    into
    1, DIV/0, DIV/0, 1, 1, DIV/0, DIV/0...

    LOOKUP formula will now seek for number 2 in this range:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    (Will work for any number greater than 1 but not less or equal).

    Since it will never find it it will look until end of the range ignoring errors (this is crucial).

    It will find last 1 and return corresponding value on that position in same size array of $F$5:$F$10000

  5. #5
    Registered User
    Join Date
    05-26-2013
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    79

    Re: VLookup most recent entry

    That makes sense.

    Why do we use the value 2...
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    What does changing this number result in?

    Cheers mate.

    Spicey_888

    Last edited by Spicey_888; 03-28-2015 at 11:32 PM.

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,596

    Re: VLookup most recent entry

    You need to use value that theoretically will never be reached.

    Since your biggest value is (if we ignore error) is number 1 (and 1 only in this case) then 2 is enough.
    You would get SAME result if you would put number 3, 3000, 1.1, 123456789 or any other number bigger than 1.

+ 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] Seeking the MOST RECENT entry in a row
    By reglook0736 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-15-2015, 08:46 AM
  2. VLOOKUP Based on Date of Most Recent Data Entry
    By sky-raptor in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-11-2014, 12:11 PM
  3. Excel 2007 : VLookup not finding most recent entry
    By Dmac11 in forum Excel General
    Replies: 4
    Last Post: 05-10-2011, 11:05 AM
  4. Most recent entry for each case
    By mathasaurus in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-28-2011, 05:41 AM
  5. Show most recent entry
    By desertdude1 in forum Excel General
    Replies: 2
    Last Post: 09-24-2008, 12:45 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