You are here:

Excel/Formula to Pick All respective Values against one selected value


I want a formula or function which can help me to show all the respective values against one selected value.
For example:-

Column A-Column B
A - Apple
A - Amit
A - Annie
B - Boy
C - Cat

As in above list, I have a drop down list, If I select "A" from the list, All names against "A" should be pasted at any perticular location.


Column A - list of ABC codes
Column B - the desired values, do not have to be sorted by the way
F1 - drop down where you've selected "A" as you choice
G1 - where the first value should appear, then going down from there:

This array formula will do the work for you:
G1: =IFERROR(INDEX($B$1:$B$100, SMALL(IF($A$1:$A$100=$F$1, ROW($A$1:$A$100), ""), ROW(A1))), "")
...confirmed by pressing CTRL-SHIFT-ENTER, not just ENTER, to activate the array.  You will know the array is active because you will see curly braces { } appear around your formula.  Once your first value correctly appears, copy that cell downward to reveal the other values.
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


All Answers

Answers by Expert:

Ask Experts


Jerry Beaucaire


Excel Formulas, macros, automation. Microsoft Excel MVP - 2010. Code site with free code snippets and techniques:


Microsoft Excel MVP - 2010. I have my own extensive Excel help/code site: ===================== I have been offering free assistance as an Excel aid on many web sites for many years: ( - JBeaucaire) ======== ( - JBeaucaire) ======= ( - jbeaucaire)

Bachelor's Degree from Azusa Pacific University in Mathematics and Music Composition

Awards and Honors
Microsoft Excel MVP 2010

©2017 All rights reserved.