+ Reply to Thread
Results 1 to 6 of 6

Xlookup with condition

  1. #1
    Registered User
    Join Date
    01-31-2020
    Location
    Spain
    MS-Off Ver
    365
    Posts
    7

    Xlookup with condition

    Morning all!
    I would like to know if it is posssible to get to this result with xlookup or other functions (without dax)

    Given a date, for example 19/05/2022, I would like to get the closest date (greater) for each item

    ITEM DATE
    A 01/05/2022
    A 02/05/2022
    A 03/05/2022
    A 20/05/2022
    A 23/05/2022
    B 01/05/2022
    B 02/05/2022
    B 24/05/2022


    RESULT
    A - 20/05/2022
    B - 24/05/2022

    Thanks in advance for your help.
    Regards!
    Attached Images Attached Images

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

    Re: Xlookup with condition

    There are instructions at the top of the page explaining how to attach your sample workbook.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, relevant cells highlighted and a few explanatory notes.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    01-31-2020
    Location
    Spain
    MS-Off Ver
    365
    Posts
    7

    Re: Xlookup with condition

    Sorry about that AliGW.
    My computer at the office does not allow me to attach any file, this is why I upload the screenshot.

    Regards

  4. #4
    Registered User
    Join Date
    01-31-2020
    Location
    Spain
    MS-Off Ver
    365
    Posts
    7

    Re: Xlookup with condition

    Solved, I've found another similar post.

    Xlookup(1, (condition 1) * (condition 2), resultColumn)

    Thanks!

  5. #5
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,176

    Re: Xlookup with condition

    You can use the MINIFS function:

    =MINIFS($C$2:$C$10,$C$2:$C$10,">"&$G$2,$B$2:$B$10,F6)

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,778

    Re: Xlookup with condition

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

+ 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] Embedding Xlookup into IF
    By mprice214 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-20-2022, 11:00 AM
  2. If this do this XLOOKUP otherwise do this XLOOKUP
    By MattKoleczko in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-21-2022, 08:14 AM
  3. [SOLVED] Xlookup in PQ
    By Excelski in forum Excel General
    Replies: 7
    Last Post: 09-09-2021, 07:15 AM
  4. Two-way Xlookup
    By Ballet4ever in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-28-2021, 10:11 PM
  5. [SOLVED] Xlookup vs vlookup
    By Mr_Phil in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-03-2021, 03:19 PM
  6. [SOLVED] Xlookup with VBA, need some help!
    By CSimm in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-19-2021, 03:14 PM
  7. Xlookup & sum
    By lynusann in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-19-2020, 11:04 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