+ Reply to Thread
Results 1 to 5 of 5

Problem with Xlookup's Wildcard search

  1. #1
    Forum Contributor
    Join Date
    12-06-2015
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    513

    Problem with Xlookup's Wildcard search

    Dear all

    I come across to a problem on the formula of Xlookup when i use the Wildcard syntax

    =XLOOKUP("*"&H8&"*",C7:C9,B7:B9,XLOOKUP("*"&H8&"*",D7:D9,B7:B9),2,1)

    See the attached.

    The formula works well in normal situation, without the wildcard search

    Can tell me where went wrong?

    appreciated

    Eric
    Attached Files Attached Files

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Problem with Xlookup's Wildcard search

    First, I don't have xlookup available in my version of excel, but if you are trying to look up the product AND the Shop 1 name that matches H8, a couple things.
    if what you are looking to return is "Major John" then your xlookup should probably look something like this...
    =XLOOKUP("*"&H8&"*",C7:C9,B7:B9)&" "&XLOOKUP("*"&H8&"*",D7:D9,B7:B9)
    Secondly, your wildcard isn't necessary because the value in H8 exactly matches the value in D9 -- though I suspect you are just testing it out.
    Here would be the correct syntax (and working formula) if using an index match to return "Major John"...
    =INDEX(B7:B9,MATCH("*"&H8&"*",D7:D9,0))&" "&INDEX(C7:C9,MATCH("*"&H8&"*",D7:D9,0))
    and it works with the wild card or without it. Maybe you can adapt your xlookup formula to suit.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Contributor
    Join Date
    12-06-2015
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    513

    Re: Problem with Xlookup's Wildcard search

    Dear Sam

    Thank you for your reply

    Perhaps i did not make it clear.

    I have redo it for your help

    My aim is to find out where the manager is based.

    I want to use the wildcard with Xlookup, is in case, the manager provides the full name, I still can find them.

    Hope i have made it clear this time

    Eric
    Attached Files Attached Files
    Last edited by Eric Tsang; 10-23-2022 at 12:27 AM. Reason: Forgot to attach

  4. #4
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,422

    Re: Problem with Xlookup's Wildcard search

    Cell G8 formula

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

  5. #5
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,427

    Re: Problem with Xlookup's Wildcard search

    The outer XLOOKUP (in workbook post #3) has not a match_mode and search_mode specified.

    Please try
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by HansDouwe; 10-23-2022 at 12:02 PM.

+ 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 for 2 criteria to search
    By Eric Tsang in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 10-20-2022, 12:42 PM
  2. how to xlookup if the search keys are comma-separated.
    By tubony in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-27-2021, 09:06 PM
  3. Xlookup variable to search for defined by slicer
    By PrimePorkchop in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-30-2021, 05:33 PM
  4. [SOLVED] Combing SUMIF SEARCH and XLookup
    By Dustychops in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-23-2021, 02:24 PM
  5. Xlookup search for value in multiple cols
    By Jbk5u in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-01-2021, 02:10 AM
  6. XLOOKUP with Wildcard and Concatenation
    By askg in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-10-2021, 01:40 PM
  7. [SOLVED] Using IF, Xlookup and Match/search, to find value in array.
    By Lee_of_Excel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-16-2020, 12:09 AM

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