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 ...

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?

mulitple look-up values
Help is very much appreciated. Thank you very much in advance.

Regards, Andreas
Andreas HermleTeam leaderAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

ProfessorJimJamMicrosoft Excel ExpertCommented:
I had done this before, find attached please.
byundtMechanical 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!
byundtMechanical 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!
Learn Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

byundtMechanical 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!

Experts Exchange Solution brought to you by

Your issues matter to us.

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

Start your 7-day free trial
Andreas HermleTeam leaderAuthor Commented:
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
Andreas HermleTeam leaderAuthor Commented:
Initial testing shows:

Wow, your formulas are so great, it'll save me hundreds of hours of tedious work. This is so fantastic. I am really, really very impressed with your expertise.

Will do some more testing and then award points. It'll be 1.000.000 points ;-)
Andreas HermleTeam leaderAuthor Commented:
If i could i would award 1.000.000 points . Thank you so much again for your superb support. I really appreciate it. Regards andreas
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.