+ Reply to Thread
Results 1 to 12 of 12

Search and return multiple results.

  1. #1
    Registered User
    Join Date
    04-01-2023
    Location
    Rotterdam, Nederland
    MS-Off Ver
    Office 365
    Posts
    53

    Search and return multiple results.

    Can someone help me find the right formula?

    I would like to find a value in another tab and return different results.

    It concerns the following:

    In the 'Tab' tab, the search value is in column A. I would like to see all matching values from column A ('Search' tab) in column B ('Tab' tab), by searching the matrix B2:O11.

    For example, if I search for the value "5.1", I expect the result in cell B3 (tab 'Tab').
    Code of Conduct
    Policy - Compliance
    Guideline - Risk Strategy
    Guideline - Risk Management
    Guideline - Information Protection
    Guideline - Data Privacy Protection
    Guideline - Identity and Access Management

    Next comes cell B4 the result.
    ""


    The result will then appear in cell B5.
    Guideline - Identity and Access Management

    Scherm?afbeelding 2023-03-31 om 22.43.34.pngScherm?afbeelding 2023-03-31 om 22.43.30.png


    What I have already found or tried
    X.LOOKUP = returns only 1 result (the first or the last)
    Pivot table = this is manual work
    Attached Files Attached Files
    Last edited by Mxmaarten; 04-01-2023 at 07:42 AM.

  2. #2
    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,213

    Re: Search and return multiple results.

    Hi there.

    A picture is worth 1,000 words. An Excel sheet is worth 1,000 non-editable pictures.

    Please read the yellow banner about sample worksheets, at the top of the screen. Act on its guidelines and post a SMALL sample sheet complete with an explanation and some expected results.
    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

  3. #3
    Registered User
    Join Date
    04-01-2023
    Location
    Rotterdam, Nederland
    MS-Off Ver
    Office 365
    Posts
    53

    Re: Search and return multiple results.

    Thanks Glenn. I'm new to the forum and it took me a while to find the functionality.

  4. #4
    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,213

    Re: Search and return multiple results.

    It takes a while to find your way around!!

    Delete all expected results. Use this. The results spill down.

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

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

    Re: Search and return multiple results.

    Tab

    B3=IF($A3<>"",TEXTJOIN(", ",TRUE,IF(Search!$B$2:$O$11=Tab!A3,Search!$A$2:$A$11,"")),"")

    Copy down

  6. #6
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,313

    Re: Search and return multiple results.

    just 'tweak' your macro - in column 'A' select your search object (making it the active cell) - press orange button to run macro - if item present appears in relative rows in column 'B'
    Attached Files Attached Files
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

  7. #7
    Registered User
    Join Date
    04-01-2023
    Location
    Rotterdam, Nederland
    MS-Off Ver
    Office 365
    Posts
    53

    Re: Search and return multiple results.

    Glenn Kennedy

    Thank you for your comment. The formula works in the file you forwarded to me. Unfortunately, when I try to modify the formula, I get an error from Excel: "This function is invalid". Excel indicates that the problem is related to the MAP function. I've already tried several things to solve the problem, but so far I haven't had any success.

  8. #8
    Registered User
    Join Date
    04-01-2023
    Location
    Rotterdam, Nederland
    MS-Off Ver
    Office 365
    Posts
    53

    Re: Search and return multiple results.

    CARACALLA

    When I use your formula I get an error. Can you put the formula in the example. Then I can take over.

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

    Re: Search and return multiple results.

    File attached
    Attached Files Attached Files

  10. #10
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,414

    Re: Search and return multiple results.

    Mxmaarten welcome to the forum.

    I the problem turns out to be the MAP function you may need to run an Office 365 update. If you are not familiar with how to do this it is under File>>More>>Account. An Update Options button will be about halfway down the right hand pane.
    Dave

  11. #11
    Registered User
    Join Date
    04-01-2023
    Location
    Rotterdam, Nederland
    MS-Off Ver
    Office 365
    Posts
    53

    Re: Search and return multiple results.

    Dear CARACALLA,

    I would like to thank you for your help in finding a solution for my excel formula. Thanks to your insight and expertise, I was able to solve the problem and can now confidently continue working on my worksheet.

    I really appreciate you taking the time to help me and teaching me how to solve these kinds of problems myself in the future. Your help has really made a difference and I am very grateful.

    Cheers,

    Maarten

  12. #12
    Registered User
    Join Date
    04-01-2023
    Location
    Rotterdam, Nederland
    MS-Off Ver
    Office 365
    Posts
    53

    Re: Search and return multiple results.

    Dear FlameRetired,

    I would like to thank you for the tip to update my Excel. It was a small change, but it made a big difference in my work. I had no idea an update was available and I was not aware of the benefits this update could provide.

    Thanks to your recommendation, I am now able to complete my tasks faster and more efficiently and have a better understanding of the latest features in Excel. I am very grateful for your help and expert advice.

    Cheers,

    Maarten

+ 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] Lookup & return multiple search results
    By Doja in forum Excel General
    Replies: 3
    Last Post: 11-27-2020, 10:12 AM
  2. Userform Search when search two text boxes return multiple results
    By nekiwa07 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-29-2020, 09:42 AM
  3. [SOLVED] Search multiple criteria and return multiple results with Closest value
    By palash1010 in forum Excel General
    Replies: 1
    Last Post: 05-28-2020, 12:23 AM
  4. [SOLVED] Macro- Search multiple criteria in spreadsheet return with multiple results in new sheet
    By nicebeaches in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-22-2018, 04:47 PM
  5. How to return multiple results in a search
    By jrlafrance in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-22-2017, 09:25 PM
  6. Replies: 6
    Last Post: 08-22-2014, 08:47 AM
  7. User Form to Search multiple Criteria to return multiple Results
    By Calieth in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-16-2011, 11:57 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