+ Reply to Thread
Results 1 to 2 of 2

How to automate to return multiple values using Index match or any other formula?

  1. #1
    Registered User
    Join Date
    06-13-2017
    Location
    Toronto
    MS-Off Ver
    2016
    Posts
    1

    How to automate to return multiple values using Index match or any other formula?

    Hi all, first off thanks in advance for your help

    I have a situation where I would like to return multiple values based on a certain criteria. Here is the table below:

    C D E F
    2: Sam David Frank
    3: Mango X
    4: Apple X X
    5: Pear X
    6: Grapes X X X


    I have a worksheet which has 1 column with values Mango, Apple, Mango, Grapes, Pear, Apple etc. in separate rows. Based on value in that column, I should be able to look up that value in above table and whichever column for that value has "X", I need to extract the names (Sam, David, Frank).

    Example: If I select "Apple", my output should be Sam and David. If I select "Grapes", my output should be Sam, David, Frank

    So far I am able to only come up with the below which is sort of hard coded to select values for "Apple" that is $D$4:$F$4. Is there a way to get rid of the hard coding and automate it?

    =INDEX($D$2:$F$2,SMALL(IF($D$4:$F$4="X",COLUMN($D$2:$F$2)-COLUMN($D$2)+1),COLUMNS($D2:D2)))

  2. #2
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: How to automate to return multiple values using Index match or any other formula?

    Welcome to the forum.

    The hard-coding to 'Apple' is caused by the $s before the 4s. Change the formula to this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    You can then drag it down as required. I'm assuming that you're putting it in column G, on each row.
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

+ 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. Return Multiple Match Values in Excel Using INDEX-MATCH
    By chris1089 in forum Excel General
    Replies: 10
    Last Post: 06-15-2017, 09:25 AM
  2. Replies: 2
    Last Post: 05-27-2015, 12:45 AM
  3. Replies: 0
    Last Post: 07-08-2014, 09:51 AM
  4. Using Index/Match to return multiple values for one match
    By superboy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-10-2014, 06:21 PM
  5. Need to look up a value and return multiple values-INDEX/MATCH?
    By abigail99 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-03-2012, 10:05 AM
  6. [SOLVED] Formula (VLOOKUP vs INDEX & MATCH) to return multiple values in the same column
    By wfidler in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-06-2012, 07:04 PM
  7. [SOLVED] How to use Index Match to return multiple values
    By pingpoeng in forum Excel General
    Replies: 2
    Last Post: 04-09-2012, 09:58 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