You are here:

Excel/return multiple matches using index/match

Advertisement


Question
I'm a novice at excel so please excuse any lack of expertise in composing my question.  I have a spreadsheet that is a survey where for a given question the answer can be 0 through 4. I need to be able to list all the questions that where answered 0, and so on.  I can get the first question answered 0 but not all the questions answered 0.  The formula that will return the first 0 response is =index(a2:a51,match(e5,c2:c51,0)).  E5 is a drop down with 0-4 available for selection. What formula will return all matches for 0 and so on?

Answer
Easiest is without a formula, but I will give you the formula answer as well.
right-click on one of the cells in C2:C51 which is a 0, and select Filter/By selected cell's value. Basically, you're filtering the range by the value in c.

The formula solution: I'm arbitrarily choosing column G for the list of items in A which match the value selected in E5.
In cell G2, enter this (G1 must be empty):
=MATCH($E$5,OFFSET($C$2,G1,0,100,1),0)+G1
Fill down to G11.
in H2:
=INDEX(A:A,G2+1)
fill down to H11.
Hid column G.
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

Excel

All Answers


Answers by Expert:


Ask Experts

Volunteer


Bob Umlas

Expertise

I`m a Microsoft Excel MVP (Most Valuable Professional) and have been since the inception of the program in 1995. I can answer every kind of Excel question except: API, Importing/exporting to other programs (powerpoint, word,...) Also check out my in-person training link at http://www.thumbtack.com/ny/new-york/excel-training/

Experience

Worked with MS Excel since version 0.99 (on the Mac!). Was contributing editor to Excellence Magazine, having written >300 articles. John Walkenbach said of me "I finally met someone who knows as much about Excel as I do."

Publications
Excellence, The Expert, Microsoft

Education/Credentials
BA in math, Hofstra University, 1965

Awards and Honors
MVP
Led sessions for the Convergence 2004-2006 seminar on Excel tips & tricks

©2016 About.com. All rights reserved.