Combine vlookup and data validation drop list

%3CLINGO-SUB%20id%3D%22lingo-sub-1758069%22%20slang%3D%22en-US%22%3ECombine%20vlookup%20and%20data%20validation%20drop%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1758069%22%20slang%3D%22en-US%22%3EI%20am%20trying%20to%20see%20if%20there%20is%20a%20way%20to%20combine%20the%20vlookup%20and%20a%20drop%20down%20list%20in%20the%20same%20cell.%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1758069%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1758088%22%20slang%3D%22en-US%22%3ERe%3A%20Combine%20vlookup%20and%20data%20validation%20drop%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1758088%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F824687%22%20target%3D%22_blank%22%3E%40Eight8ball5%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECan%20you%20explain%20in%20detail%20what%20you%20want%20to%20do%3F%20Thanks%20in%20advance.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor
I am trying to see if there is a way to combine the vlookup and a drop down list in the same cell.
3 Replies
Highlighted

@Eight8ball5 

Can you explain in detail what you want to do? Thanks in advance.

Highlighted

@Hans Vogelaar I am trying to create a request for where you can choose from a dropdown list in column "A" or column "B". When selecting from the dropdown in column "A" it would fill in the information in columns "B" and "C". If you select from the dropdown in column "B" it would fill in the information for columns "A" and "C". is this possible?

@Eight8ball5 

You can't combine them, because selecting an item from the validation dropdown will overwrite the VLOOKUP formula. But you can simulate it with VBA code in the Worksheet_Change event procedure of the sheet.

I have attached a sample workbook with a simplistic example. If you select a first name from the validation dropdown in column A, the code will fill in the last name in column B, and vice versa. Column C contains an ordinary VLOOKUP formula.

 

Please note that the workbook is a macro-enabled workbook and that you have to allow macros when you open it.