Index Match/Vlookup with multiple return

Benfernandez

New Member
Joined
Jul 16, 2012
Messages
6
Hi Guys,

Tried a few things to get this working but nothing so far; looking to return multiple cells when text is typed into a cell, for example:

Moscow MuleVodka1**SEARCH TERM**
Lime3
Ginger Beer1
Angastora bitter1

<tbody>
</tbody>


So when Moscow Mule is typed into **SEARCH TERM** the ingredients are returned, different drinks will have different ingredients hence simply returning the four cells to the right of the name will not work, rather it needs to return a block of cells associated with said drink.


Have been attempting index match/vlookup but cant find how to return multiple cells

Thanks in advance!


Ben
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Do you want each ingredient to be returned in its own cell?
 
Upvote 0
With Moscow Mule in column A, ingredients in column B and search term in C1, put this in C2 and drag down:

=IFERROR(INDEX(B:B,MATCH(C$1,A:A,0)+ROW(A1)-1),"")
 
Upvote 0
Thanks, would you be able to explain this quickly? Not quiet sure why iferrror is there, also where would the search term be typed?
 
Upvote 0
IFERROR is so that if MATCH doesn't find anything, the formula should not evaluate to an #N/A error. Type the formula in C2 and drag it down.
 
Upvote 0

Forum statistics

Threads
1,215,639
Messages
6,125,970
Members
449,276
Latest member
surendra75

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top