+ Reply to Thread
Results 1 to 6 of 6

How to search one item in Excel and locate many results?

  1. #1
    Registered User
    Join Date
    11-16-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    16

    How to search one item in Excel and locate many results?

    I am trying to find out if there is a way to automate the ability for search criteria in excel to search a table of data, compare matches on specific lines to another list in the same sheet, and provide one or more results.

    An example would be, a sales person enters a part number in (B2), the formula is set to search a table of data (C12 to P40) and then compare by the cell location where the matches were found, cross reference them with part numbers listed in cells B12 to B40, and then list comparable part numbers from B12-B40 in cells E2, E3, E4, etc.?

    See attached for the workbook. I've seen it done in excel before but my example is a locked workbook...that of course, no one knows the password to.

    Any guidance would be greatly appreciated!!!

    I added similar comments within the workbook. See 'comments' in cells B2 and E2.

    Thanks!

    Test1.xlsx

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

    Re: How to search one item in Excel and locate many results?

    Put this formula in R12:

    =IF(ISNUMBER(MATCH($B$2,C12:P12,0)),MAX(R$11:R11)+1,"-")

    and copy it down to R40.

    Then put this formula in E2:

    =IFERROR(INDEX(B:B,MATCH(ROWS($1:1),R:R,0)),"")

    and copy that down to E7.

    Hope this helps.

    Pete

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: How to search one item in Excel and locate many results?

    In E2 and copy formula down

    =IFERROR(INDEX($B$12:$B$40,SMALL(IF($C$12:$P$40=$B$2,ROW($B$12:$B$40)-ROW($B$11)),ROWS($A$1:A1))),"")

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    Attached Files Attached Files
    Last edited by AlKey; 06-16-2014 at 05:55 PM. Reason: UPDATED FORMULA
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Registered User
    Join Date
    11-16-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: How to search one item in Excel and locate many results?

    WOW! That was fast. Thanks so much for the help guys, I'll definitely make a note of this for the future.

    Cheers!

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

    Re: How to search one item in Excel and locate many results?

    If that takes care of your original question, please select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: How to search one item in Excel and locate many results?

    Thank you for the feedback!

    Please mark thread as "Solved" if your issue has been resolved. (Selecting Thread Tools-> Mark thread as Solved).

+ 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. UserForm: Search Item in List > Call Table associated with Item > Execute Command
    By TexasAggie12 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-25-2014, 12:58 PM
  2. to return Mutliple results with one search item
    By Bald Ben in forum Excel General
    Replies: 2
    Last Post: 01-14-2011, 04:44 PM
  3. Locate Item and color it
    By Bob@Sun in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-14-2010, 12:34 PM
  4. How to Locate a value and display the match item
    By wpm7113 in forum Excel General
    Replies: 7
    Last Post: 05-16-2008, 07:54 AM
  5. Use Match to locate a item in an array
    By chrisrita in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-15-2007, 03:07 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