+ Reply to Thread
Results 1 to 13 of 13

Lookup Single value in multiple columns return match

  1. #1
    Registered User
    Join Date
    09-09-2021
    Location
    London, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    56

    Lookup Single value in multiple columns return match

    Ok I have wasted about 6 hours googling this and I cannot find a solution. It seems like it should be simple but I can't get my head around this.

    - Imagine 2 worksheets "Data" and "Form"
    - "Data" has 6 columns of data
    - the cells in all 5 of these column have different values or may be blank. There are no duplicates other than blank cells.
    - I cannot rework the columns in the "Data" they need to remain as is.
    - From the "form" sheet I want to look up a single value

    What I am trying to do is look for a single value in RunID columns 2,3,4,5 on the "Data" sheet and return the match in column 1 Run # to be displayed in the "Form" sheet.
    The RunID entered on the Form is not always the entire value as it appears in the RunID columns on the "Data" sheet.

    I tried a couple array versions of Index Match but those were not getting me what I needed and also the array formula, for some reason, was not staying an array.

    Hope that makes sense.

    Gray.
    Attached Files Attached Files
    Last edited by GrayWolf; 10-22-2021 at 02:06 PM.

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Lookup Single value in multiple columns return match

    Please try

    =FILTER(Data!A2:A213,MMULT(-ISNUMBER(FIND(B2,Data!B2:E213)),{1;1;1;1}))

    or
    =INDEX(Data!A1:A213,MAX(ROW(Data!A2:A213)*(ISNUMBER(FIND(B2,Data!B2:E213)))))

    or
    =XLOOKUP("*"&B2&"*",Data!B2:B213&Data!C2:C213&Data!D2:D213&Data!E2:E213,Data!A2:A213,,2)
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,197

    Re: Lookup Single value in multiple columns return match

    Another

    =INDEX(Data!$A$1:$A$213,SUMPRODUCT(--(Data!$B$1:$E$213=Form!B2)*(ROW($A$1:B213))))
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

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

    Re: Lookup Single value in multiple columns return match

    Form

    A2=IFERROR(INDEX(Data!$A$2:$A$213,AGGREGATE(15,6,ROW(Data!$A$2:$A$213)-ROW(Data!$A$2)+1/(ISNUMBER(SEARCH(Form!$B$2,Data!$B$2:$E$213))),ROWS(Data!$A$2:Data!A2))),"")

    Copy down

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

    Re: Lookup Single value in multiple columns return match

    worksheet name : Form

    cell C2 array formula

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

  6. #6
    Registered User
    Join Date
    09-09-2021
    Location
    London, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    56

    Re: Lookup Single value in multiple columns return match

    Quote Originally Posted by Bo_Ry View Post
    Please try

    =FILTER(Data!A2:A213,MMULT(-ISNUMBER(FIND(B2,Data!B2:E213)),{1;1;1;1}))

    or
    =INDEX(Data!A1:A213,MAX(ROW(Data!A2:A213)*(ISNUMBER(FIND(B2,Data!B2:E213)))))

    or
    =XLOOKUP("*"&B2&"*",Data!B2:B213&Data!C2:C213&Data!D2:D213&Data!E2:E213,Data!A2:A213,,2)
    Thank you. the Index one worked for me.

  7. #7
    Registered User
    Join Date
    09-09-2021
    Location
    London, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    56

    Re: Lookup Single value in multiple columns return match

    Quote Originally Posted by JohnTopley View Post
    Another

    =INDEX(Data!$A$1:$A$213,SUMPRODUCT(--(Data!$B$1:$E$213=Form!B2)*(ROW($A$1:B213))))

    This did not solve my problem, however the post above had some answers that worked. Your formula just lists the entire Run # column from the Data sheet.

  8. #8
    Registered User
    Join Date
    09-09-2021
    Location
    London, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    56

    Re: Lookup Single value in multiple columns return match

    Quote Originally Posted by CARACALLA View Post
    Form

    A2=IFERROR(INDEX(Data!$A$2:$A$213,AGGREGATE(15,6,ROW(Data!$A$2:$A$213)-ROW(Data!$A$2)+1/(ISNUMBER(SEARCH(Form!$B$2,Data!$B$2:$E$213))),ROWS(Data!$A$2:Data!A2))),"")

    Copy down
    This did not solve my problem, however the post above had some answers that worked. Your formula just provides a result in the first cell then all the cells below are empty/blank.

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,197

    Re: Lookup Single value in multiple columns return match

    =INDEX(Data!$A$1:$A$213,SUMPRODUCT(--ISNUMBER(SEARCH($B$2,Data!$B$1:$E$213))*ROW($B$1:$B$213)))

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

    Re: Lookup Single value in multiple columns return match

    Why don't works ?
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    09-09-2021
    Location
    London, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    56

    Re: Lookup Single value in multiple columns return match

    This one works now I had to take the $$ off the B2 so I could drag the formula down my list.

    Thank you.

  12. #12
    Registered User
    Join Date
    09-09-2021
    Location
    London, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    56

    Re: Lookup Single value in multiple columns return match

    It works in cell A2, but, I cannot drag the formula down to get it to work for the cells below A3, A4, A5, etc ... after the first cell.

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

    Re: Lookup Single value in multiple columns return match

    type in b1 rob-

+ 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. Replies: 1
    Last Post: 05-12-2020, 08:42 AM
  2. Replies: 4
    Last Post: 11-20-2014, 10:57 PM
  3. lookup a single value and return items in multiple columns
    By FredFitzgerald in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-20-2014, 03:29 PM
  4. Lookup multiple values in different columns and return a single value
    By tanyael in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 07-18-2014, 10:41 AM
  5. Replies: 10
    Last Post: 02-19-2013, 12:05 PM
  6. [SOLVED] Lookup match index multiple values return other columns
    By martypocock in forum Excel Formulas & Functions
    Replies: 25
    Last Post: 11-07-2012, 10:57 PM
  7. Replies: 2
    Last Post: 08-31-2006, 03:06 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