+ Reply to Thread
Results 1 to 11 of 11

Using XLOOKUP for 2 search criteria

  1. #1
    Registered User
    Join Date
    01-13-2023
    Location
    Canada
    MS-Off Ver
    365
    Posts
    7

    Using XLOOKUP for 2 search criteria

    Hi!

    I need to find a way to use the Xlookup function to be able to find an specific cell. In the example provided, I need the XLOOKUP to match BOTH the patient initials and the Store number (because there might be several same stores with different initials, or same initials in different stores) in order to provide the correct return array. I have tried nesting one XLOOKUP inside another one, or also if statements, but cannot manage it to work, any ideas?

    I want the Return array to be C:C "the issue" column, while having to search and match A:A & B:B (initials and store)

    Annotation 2023-01-13 120712.png






    Example xlookup.xlsx
    Last edited by santoma; 01-13-2023 at 01:42 PM.

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

    Re: Using XLOOKUP for 2 search criteria

    In your example file you have two as values in column A with the same store number in B - what do you want to see as the result?

    Pete

  3. #3
    Registered User
    Join Date
    01-13-2023
    Location
    Canada
    MS-Off Ver
    365
    Posts
    7

    Re: Using XLOOKUP for 2 search criteria

    So sorry I will edit post to reflect my need. I want the Return array to be C:C "the issue" column, while having to search and match A:A & B:B (initials and store)

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Using XLOOKUP for 2 search criteria

    something like this ?

    Patient initials Store Indicate the issue
    as
    1541
    No demand
    as
    1541
    Barcode does not scan


    different indicate issue

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Using XLOOKUP for 2 search criteria

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

  6. #6
    Registered User
    Join Date
    01-13-2023
    Location
    Canada
    MS-Off Ver
    365
    Posts
    7

    Re: Using XLOOKUP for 2 search criteria

    Not exactly like that. As I mentioned in my post. There might be same initials and different stores or viceversa. I need the function to match both of those (A:A & B:B) and return C:C, even if there are duplicates of just A:A or B:B. Basically a search bar

  7. #7
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Using XLOOKUP for 2 search criteria

    to whom is your last post?

    another option

    Patient initials Store Indicate the issue
    as
    1541
    No demand, Barcode does not scan


    you can choose between post#4
    Please Login or Register  to view this content.
    or
    post#7
    Please Login or Register  to view this content.
    Last edited by sandy666; 01-13-2023 at 03:07 PM.

  8. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Using XLOOKUP for 2 search criteria

    I need the function to match both of those (A:A & B:B) and return C:C
    That's exactly what the formula I supplied does.

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

    Re: Using XLOOKUP for 2 search criteria

    G8=TEXTJOIN("-",TRUE,IF((Table2[Patient initials]=$E8)*(Table2[Store]=$F8),Table2[Indicate the issue],""))

  10. #10
    Registered User
    Join Date
    01-13-2023
    Location
    Canada
    MS-Off Ver
    365
    Posts
    7

    Re: Using XLOOKUP for 2 search criteria

    Quote Originally Posted by Fluff13 View Post
    How about
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    This works! although it "Spills" if I have multiple same initials (which will possibly happen) but this solves my issue, appreciate it!

  11. #11
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Using XLOOKUP for 2 search criteria

    Glad to help & thanks for the feedback.

+ 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 search criteria and multiple return values
    By Cuni in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 10-26-2022, 09:27 AM
  2. Problem with Xlookup's Wildcard search
    By Eric Tsang in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-23-2022, 02:44 AM
  3. [SOLVED] Xlookup for 2 criteria to search
    By Eric Tsang in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 10-20-2022, 12:42 PM
  4. [SOLVED] I want to understand how the option search last to first in XLOOKUP works
    By HansDouwe in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-07-2022, 11:58 AM
  5. [SOLVED] Combing SUMIF SEARCH and XLookup
    By Dustychops in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-23-2021, 02:24 PM
  6. Xlookup search for value in multiple cols
    By Jbk5u in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-01-2021, 02:10 AM
  7. [SOLVED] search data using xlookup function in excel?
    By rena80 in forum Excel General
    Replies: 0
    Last Post: 09-15-2021, 11:57 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