Question: How do i return multiple results for one lookup value? I have tried to use multiple vlookups, with no luck.
How do you find multiple occurances? Do I need to use match function?
How do i present all the adjacent values to a searchstring?

multiple_lookups.png

Answer: If multiple cells match the same criteria you can use this formula E1:E8.

=INDEX(B1:B8,SMALL(IF(A1:A8=D1,ROW(A1:A8),""),ROW())) + Ctrl + Shift + Enter in cell E1:E8. Search value is in D1.
multiple_lookups_1.png

Let us start with this part of formula, which is easy to understand.

IF(A1:A8=D1,ROW(A1:A8),"")
{A,B,C,D,A,C,A,B}=A
{TRUE,FALSE,FALSE,FALSE,TRUE,FALSE,TRUE,FALSE}
{1,5,7}

SMALL(IF(A1:A8=D1,ROW(A1:A8),""),ROW())
{1,5,7}

=INDEX(B1:B8,SMALL(IF(A1:A8=D1,ROW(A1:A8),""),ROW()))
{Car,Rocket,Ship}

Download excel sample file for this tutorial. 
using-array-formula-to-look-up-multiple-values-in-a-list.xls

(Excel 97-2003 Workbook *.xls)

INDEX(array,row_num,[column_num])

Returns a value or reference of the cell at the intersection of a particular row and column, in a given range

SMALL(array, k) returns the k-th smallest number in this data set.

ROW(reference)
returns the row number of a reference

  • Share/Bookmark

Related posts:

  1. Unique distinct values from multiple columns using array formula
  2. Lookup with multiple criteria and display multiple search results using excel formula, part 2
  3. Lookup with multiple criteria and display multiple search results using excel formula
  4. Lookup with multiple criteria and display multiple search results using excel formula, part 3
  5. Lookup with multiple criteria and display multiple search results using excel formula, part 4
  6. Filter common values between two ranges using array formula in excel
  7. Extract largest values from two columns using array formula in excel
  8. Filter unique distinct list sorted based on sum of adjacent values using array formula in excel
  9. Filter a column and create a new unique list sorted from A to Z using array formula in excel
  10. Sort text values by length using array formula in excel