+ Reply to Thread
Results 1 to 5 of 5

XLOOKUP and lookup for the nearest previous date

  1. #1
    Forum Contributor
    Join Date
    10-31-2006
    Location
    Oslo, Norway
    MS-Off Ver
    MS 365 Business
    Posts
    286

    XLOOKUP and lookup for the nearest previous date

    If I register a date that doesn't excist in the table, I want the values for the nearest previous dato.

    Please see the attached excel file.
    So, if I register 14. april I want the values 128 / 114
    or if I register 10. april I want 139 / 196.
    How can I use the XLOOKUP for this operation?
    Last edited by AliGW; 06-03-2020 at 10:37 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,432

    Re: XLOOKUP and lookup for the nearest previous date

    Sorry you were having trouble with this thread - it has now been fixed.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,790

    Re: XLOOKUP and lookup for the nearest previous date

    D18=index(d7:e13,match(d16,c7:c13),match(d17,d6:e6,0))



    D18=XLOOKUP(D16,C7:C13,INDEX($D$7:$E$13,,MATCH(D17,D6:E6,0)),,-1)


    works only for Office 365
    Last edited by CARACALLA; 06-03-2020 at 11:11 AM.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,814

    Re: XLOOKUP and lookup for the nearest previous date

    You can use this formula in D18:

    =VLOOKUP(D16,$C$7:$E$13,MATCH(D17,C6:E6,0))

    You can change D17 to North or South, as appropriate.

    Hope this helps.

    Pete

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: XLOOKUP and lookup for the nearest previous date

    Please try

    =XLOOKUP(D16,C7:C13,D7:E13,,-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. XLOOKUP and lookup of the nearest previous date
    By Saturn in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-04-2020, 05:21 AM
  2. XLOOKUP and lookup of the previous nearest date.
    By Saturn in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-04-2020, 05:11 AM
  3. [SOLVED] Find nearest previous date for a date & given value combination
    By Jules1414 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-28-2018, 09:42 AM
  4. Find nearest previous date for a date & given value combination
    By Jules1414 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-28-2018, 07:11 AM
  5. LOOKUP the nearest previous similar value
    By gregersdk in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-23-2015, 06:35 AM
  6. [SOLVED] Lookup for nearest date and value, given a date and name
    By sfshah in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-19-2013, 09:07 AM
  7. Replies: 4
    Last Post: 10-31-2010, 09:37 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