问题
While i have seen this topic answered before i cant seem to understand the solution :(
Here is my worksheet: https://docs.google.com/spreadsheet/pub?key=0AsCQyX3EZ40SdC1FNFBjVDh6d01iY2g0WnVXOU5GeFE&output=xls
As you can see i need the second INDEX in the first sheet to return the second value looked, but instead (as expected) it shows the first one again.
I am not the best with excel, explain slowly and i will understand fast!
Thanks in advance!
回答1:
Try this "array formula" in Calculator sheet cell A3
=IFERROR(INDEX(IngredientDB!B$1:B$100,SMALL(IF(IngredientDB!$A$1:$A$100=$B$1,ROW(IngredientDB!$A$1:$A$100)),ROWS(A$3:A3))),"")
confirmed with CTRL+SHIFT+ENTER and copied across and down. When you run out of entries you get blanks - assumes up to 100 rows of data, increase as required
回答2:
If you wanted to go the pivot table route you can start with this as a base and then customize it to your exact liking.:
Start with your info:

Then add a pivot of your data:

Then set the properties as so and then you can select the search terms, you can also change the settings to allow someone to type it in also:
The result will be as so:

来源:https://stackoverflow.com/questions/19642462/returning-multiple-values-with-index-and-match-without-vba