+ Reply to Thread
Results 1 to 8 of 8

Xlookup multiple criteria

  1. #1
    Registered User
    Join Date
    01-24-2023
    Location
    barcelona
    MS-Off Ver
    365
    Posts
    4

    Xlookup multiple criteria

    Hi, I am doing a xlookup multiple criteria with boolean expression XLOOKUP(1,(B2=range 1)*(C2=range 2), range 3). However, the values in range 2 do not match all the time with C2 and I would like this part of the formula to look for a lower value in range 2 value provided the condition of range 1. Thanks a lot for the support!

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: Xlookup multiple criteria

    Something like

    =IFERROR(XLOOKUP(1,(B2=range 1)*(C2=range 2), range 3),XLOOKUP(1,(B2=range 1)*(range 2<C2), range 3))
    Last edited by Bernie Deitrick; 01-24-2023 at 11:22 AM.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    01-24-2023
    Location
    barcelona
    MS-Off Ver
    365
    Posts
    4

    Re: Xlookup multiple criteria

    Hi,

    Thanks for the answer but the formula did not work as expected, I think I did not explained myself. If I use the example of the first post, the result of the formula you suggested is in the column Prev.V,
    while my expected result is in the column Exp.V. For example, the value y should start when the values C2 pass the threshold of 73008 of range 2.

    Thanks a lot for your help! Really appreciated


    [/CENTER]

    2023-01-25 16_58_42-202301_Analysis_file_configurable - Excel.png

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

    Re: Xlookup multiple criteria

    Fast answers need clear examples. Post a small Excel sheet (not a picture) showing realistic & representative sample data WITHOUT confidential information (10-20 rows, not thousands...) and some manually calculated results. For a new thread (1st post), scroll to Manage Attachments, otherwise scroll down to GO ADVANCED, click, and then scroll down to MANAGE ATTACHMENTS and click again. Now follow the instructions at the top of that screen.

  5. #5
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: Xlookup multiple criteria

    In E2, for the layout shown below: Note the change in values in Range 2 to be one less than before....

    =INDEX($B$3:$B$5,MATCH(D2,$A$2:$A$5,1))

    Capture.JPG

  6. #6
    Registered User
    Join Date
    01-24-2023
    Location
    barcelona
    MS-Off Ver
    365
    Posts
    4

    Re: Xlookup multiple criteria

    Hi everyone,

    Thanks for your time and effort, and sorry if I did not post a clear Excel example. Please find it attached:

    Tab 1: data
    Tab 2: my actual calculations, the expected results I would like to obtain and the comments I made

    Thank you very much.
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Xlookup multiple criteria

    Try this version.

    =LET(a,SORT(FILTER(Table1[[Scale Quantity]:[Purchase Price]],Table1[Product]=A2)),IFERROR(LOOKUP(B2,a),INDEX(a,1,2)))
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  8. #8
    Registered User
    Join Date
    01-24-2023
    Location
    barcelona
    MS-Off Ver
    365
    Posts
    4

    Re: Xlookup multiple criteria

    Hi Haseeb,

    this worked perfectly! Thank you so much, you saved my day!

    Best Regards

+ 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] XLOOKUP with multiple criteria options
    By jman0502 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 09-17-2022, 07:57 AM
  2. [SOLVED] xlookup multiple criteria #Value!
    By justinwb in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-05-2022, 09:10 PM
  3. [SOLVED] XLOOKUP and dates with multiple criteria.
    By RD3 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-14-2022, 09:20 AM
  4. Xlookup with multiple criteria
    By Mackay2m in forum Excel Formulas & Functions
    Replies: 21
    Last Post: 01-12-2022, 04:09 PM
  5. Replies: 5
    Last Post: 08-17-2021, 03:06 PM
  6. Help on XLOOKUP formula with multiple criteria
    By lyzas in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-22-2021, 05:06 AM
  7. Multiple criteria for XLOOKUP formula
    By mikehk in forum Excel General
    Replies: 1
    Last Post: 06-28-2021, 05:50 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