+ Reply to Thread
Results 1 to 8 of 8

Search for single value in table array

  1. #1
    Registered User
    Join Date
    08-19-2013
    Location
    USA
    MS-Off Ver
    Excel 2011 (MAC)
    Posts
    2

    Search for single value in table array

    Hey all,

    This is a question I've had for a while, and researched many times without finding a solution (I hope I'm not just missing something very simple). My goal is to lookup a value in a table I have. Specifically, I'm trying to search multiple columns for a value, and return a value from the same row.

    Here's an easy example of what I am looking for (see attached): organizing a camping trip. I have a list of cabins, and assigned the participants to each one, based on how many bunks were available in each cabin. I'd like to turn this list into a rooming list that I can sort alphabetically by participant. I'd like to do this by using a search function to lookup which cabin the person was assigned.

    ExcelHelp_Table_and_Desired_Results.xlsx

    Please help! Many thanks.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Search for single value in table array

    I rearange the data with the macro below.

    After that you can just filter on column D.

    See the attached file.

    Please Login or Register  to view this content.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Search for single value in table array

    If VB isn't your style you could try this. It's a bit long though.

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

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Search for single value in table array

    Or this array formula (confirm with CTRL+SHIFT+ENTER, not just ENTER) in B16 and copy down:

    =INDEX($A$4:$A$8,MATCH(A16,INDEX($C$4:$F$8,,MATCH(1,MMULT(TRANSPOSE(ROW($A$4:$A$8))^0,--($C$4:$F$8=A16)),0)),0))

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  5. #5
    Registered User
    Join Date
    08-19-2013
    Location
    USA
    MS-Off Ver
    Excel 2011 (MAC)
    Posts
    2

    Re: Search for single value in table array

    Thank you to all of you. each of those solutions works. I'm going to end up going with the Macro, only because my actual use requires a much larger data set (63 R x 7 C) and the macro can cut through it faster. Thanks all!

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Search for single value in table array

    Thanks for the reply.

    Glad I could help.

    You can add point to the rep(utation) of the members who helped you, by clicking on the star on the left side.

  7. #7
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Search for single value in table array

    Bah! Re-arranging the data's cheating!

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Search for single value in table array

    Here's another one...

    This array formula** entered in B16 and copied down:

    =INDEX(A:A,SMALL(IF(C$4:F$8=A16,ROW(C$4:F$8)),1))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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] Array Formula to Lookup and Return All Rows in Table that Meet Single Criteria
    By Torkel74 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-15-2013, 10:41 PM
  2. Replies: 3
    Last Post: 03-28-2012, 05:59 PM
  3. Table Array Search [2]
    By ExcelJunkie in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-11-2006, 09:56 PM
  4. Table Array Search
    By ExcelJunkie in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-11-2006, 05:01 PM
  5. [SOLVED] Using single cell reference as table array argument in Vlookup
    By CornNiblet in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-22-2005, 04:15 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