+ Reply to Thread
Results 1 to 7 of 7

Xlookup formula to get result from different worksheet

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    06-11-2009
    Location
    Cape Town
    MS-Off Ver
    Microsoft 365
    Posts
    858

    Xlookup formula to get result from different worksheet

    I have 2 sheets.

    Sheet1 has data.
    Sheet2 has result.

    I have tried to use xlookup without success?

    Sample file attached.

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2503
    Posts
    13,708

    Re: Xlookup formula to get result from different worksheet

    Please try
    Formula: copy to clipboard
    =XLOOKUP(B2,Data!$C$2:$C$6,Data!$A$2:$A$6)
    Returned 'Mike'.
    Dave

  3. #3
    Forum Contributor
    Join Date
    06-11-2009
    Location
    Cape Town
    MS-Off Ver
    Microsoft 365
    Posts
    858

    Re: Xlookup formula to get result from different worksheet

    Thanks for your reply -that did work on the sample file I attached but there are multiple columns of comments in the data.
    I have attached an updated sample file.

    Thanks in advance
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,909

    Re: Xlookup formula to get result from different worksheet

    c2
    =INDEX(Data!A:A,LARGE(MMULT(--(Data!$C$2:$F$6=$B2)*ROW(Data!$C$2:$F$6),TRANSPOSE(COLUMN($C$2:$F$2)^0)),1))

    copied down and across.
    Attached Files Attached Files

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Xlookup formula to get result from different worksheet

    or... do it all in one go, in one cell:

    Delete ALL expected results and use:

    Formula: copy to clipboard
    =DROP(REDUCE(0,B2:B7,LAMBDA(x,y,VSTACK(x,INDEX(Data!A:B,LARGE(MMULT(--(Data!$C$2:$F$6=y)*ROW(Data!$C$2:$F$6),TRANSPOSE(COLUMN(Data!$C$2:$F$2)^0)),1),{1,2})))),1)
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

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

    Re: Xlookup formula to get result from different worksheet

    C2=IF($B2<>"",LET(a,AGGREGATE(14,6,Data!$B$2:$B$6/(ISNUMBER(SEARCH(Result!$B2,Data!$C$2:$F$6))),1),I,INDEX(Data!$A$2:$A$6,MATCH(a,Data!$B$2:$B$6,0)),CHOOSE({1,2},I,a)),"")

    Copy down from c2

  7. #7
    Forum Contributor John Vergara's Avatar
    Join Date
    01-17-2022
    Location
    Colombia
    MS-Off Ver
    365
    Posts
    206

    Re: Xlookup formula to get result from different worksheet

    Hi to all!

    Another option could be:
    PHP Code: 
    =LET(f,LAMBDA(r,MAP(B2:B7,LAMBDA(x,LET(c,CONCAT(IF(Data!C2:F6=x,r,"")),IFERROR(--c,c))))),HSTACK(f(Data!A2:A6),f(Data!B2:B6))) 
    Check file. Blessings!
    Attached Files Attached Files

+ 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. Macro to select next result that an xlookup would return
    By Dylan1023 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-18-2023, 11:02 PM
  2. Xlookup make result blank if contains keyword
    By LocSpreader in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-01-2023, 03:57 AM
  3. [SOLVED] trying to use xlookup to get the result of looking at 2 columns
    By gjjh25 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-30-2022, 08:19 AM
  4. Replies: 1
    Last Post: 04-27-2021, 08:24 AM
  5. [SOLVED] Can I show a formula's result on a worksheet tab?
    By JE McGimpsey in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2005, 08:05 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