We help IT Professionals succeed at work.

vlookup and return multiple results (vba)

Last Modified: 2020-09-29
I need of a macro to perform VLOOKUP and return multiple results. there are two sheets (Sheet1 and Sheet2). the data I’m looking for in Sheet1 is in column C. the lookup value is in Sheet2, column A and want the results in column B but be horizontal.

example: for the lookup value in A1 I want the results to be in column B1 , C1 D1, E1 and etc.
Watch Question

Rob HensonFinance Analyst

Some sample data would be good.

I am thinking you might be able to get a similar result with a pivot table rather than VBA

Create a pivot with column A header as a row value and column B header as column value, the result will be a matrix of column A values in rows and column B values in columns. If you filter on column A, the rows, for the lookup value, the only items to stay as column headers will be the matching values from column B.
Subodh Tiwari (Neeraj)Excel & VBA Expert
Most Valuable Expert 2018
Awarded 2015

If the lookup values are in column A on Sheet2, where these lookup values are found on Sheet1 i.e. in which column on Sheet1?

As Rob said, a sample workbook would be helpful.
Lennon GaryJunior Oracle Database Administrator


i have uploaded a sample file. the lookup value is in Sheet2 Column A and i want the results to be in column B, C, D and etc.
Finance Analyst
This one is on us!
(Get your first solution completely free - no credit card required)
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.