# Use array formula to look up multiple values in a list

Dear Experts:

My sample table includes my lookup values multiple times,

I found a nice array formula to complete this task on ...
http://fiveminutelessons.com/learn-microsoft-excel/use-index-lookup-multiple-values-list

It also looks at how to do this when you want to return all values which are a partial match (i.e. a wildcard search) to the values in your lookup table (see worksheet 'Find crop values, partial match').

There is one thing I would like to get tweaked on this array formula.

Instead of displaying the retrieved values (Beans, Corn, Hops) vertically I would like to have them displayed horizontally using a tweaked array formula. Is this possible?

Help is very much appreciated. Thank you very much in advance.

Regards, Andreas
find_mulitple_values_lookup_sample_.xlsx
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Microsoft Excel ExpertCommented:
EE.xlsx
Mechanical EngineerCommented:
Slightly different twist on ProfessorJimJam's formula. This one may be pasted in cell B20 and copied across:
=IFERROR(INDEX(\$C\$2:\$C\$6,SMALL(IF(\$A\$2:\$A\$6=\$A20,ROW(\$A\$2:\$A\$6)-ROW(\$A\$2)+1,""),COLUMNS(\$B20:B20))),"")                  must be array-entered!
Mechanical EngineerCommented:
And if you want the formula to work with partials (e.g. H24), then use:
=IFERROR(INDEX(\$C\$2:\$C\$6,SMALL(IF(ISERROR(SEARCH(\$A20,\$A\$2:\$A\$6)),"",ROW(\$A\$2:\$A\$6)-ROW(\$A\$2)+1),COLUMNS(\$B20:B20))),"")                must be array-entered!
Mechanical EngineerCommented:
And a substantially shorter formula for use in cell A11:
=IFERROR(INDEX(C\$2:C\$6,SMALL(IF(ISERROR(SEARCH(A\$9,A\$2:A\$6)),"",ROW(A\$2:A\$6)-ROW(\$A\$2)+1),ROWS(A\$11:A11))),"")                 must be array-entered!
find_multiple_values_lookup_sampleQ.xlsx

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Dear both,

thank you very much for your great and very swift support. I will do some testing today and then let you know. I am so grateful to be able to turn to people like your for very demaanding questions on excel.

Regards, Andreas