+ Reply to Thread
Results 1 to 4 of 4

Multiple Values returned in a lookup

  1. #1
    Registered User
    Join Date
    12-23-2013
    Location
    Alabama
    MS-Off Ver
    Excel 2007
    Posts
    1

    Multiple Values returned in a lookup

    I have a table where the rows are conditions and the columns are experiment numbers, as an example below:

    Experiment 1 Experiment 2 Experiment 3
    Hardness X X
    Solubility X X
    Density X X


    The table is fairly large. What I would like to be able to do is use a lookup/formula that will return all the experiment numbers a given condition is tested in. In other words, for a given condition (i.e., Hardness), which columns have an "X". Not sure if that can be done with a lookup or not or if there is another function necessary. I would like to be able to do it without macros though and also have it automatically update if I move the "X" around to different experiments.
    Last edited by Droopy23; 12-23-2013 at 01:03 PM.

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Multiple Values returned in a lookup

    I obviously can't grasp your restraints, but why not use a pivot table?
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,369

    Re: Multiple Values returned in a lookup

    Maybe something like this? See the file

    Azumi
    Attached Files Attached Files

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

    Re: Multiple Values returned in a lookup

    Try this...

    Data Range
    A
    B
    C
    D
    1
    Experiment 1
    Experiment 2
    Experiment 3
    2
    Hardness
    X
    X
    3
    Solubility
    X
    X
    4
    Density
    X
    X
    5
    6
    Hardness
    Experiment 1
    Experiment 3


    This array formula** entered in B6:

    =IFERROR(INDEX($B$1:$D$1,SMALL(IF(INDEX($B$2:$D$4,MATCH($A6,$A$2:$A$4,0),0)="x",COLUMN($B2:$D4)),COLUMNS($B6:B6))-COLUMN($B2)+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.

    Copy across to D6.
    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. Using approximate lookup and getting duplicate returned values
    By nikkigotro in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-16-2013, 02:54 PM
  2. Duplicate values returned using Index Match Lookup with Small()
    By jacob@thepenpoint in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-18-2013, 10:48 AM
  3. Replies: 4
    Last Post: 04-20-2012, 06:17 AM
  4. Lookup row for value and sum returned values.
    By TypeR in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-11-2007, 07:16 AM
  5. Can I get multiple values returned for an IF formula?
    By TeachCTC in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 11-15-2005, 10:55 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