Vlookup a value(s) in comma separated cell and return value(s) in another comma separated cell

catstu

New Member
Joined
Jun 12, 2015
Messages
1
Hi,

I am looking for VBA code to help with the following issue.
I have a cell where I can choose, from a dropdown menu, one or multiple choices.
The results, if I choose more than one value, are separated by a ",".
I would like some code to allow me, once I have made the choices from the dropdown menu, to perform a VLOOKUP function on the resulting words and put the results in another cell, separated by a "|".

Eg:

Cell I3 - if I choose just "intubation", I want Cell J3 to show "4362" (from a simple table where each word has just one corresponding number).

If Cell I3 is chosen to be "intubation, tracheostomy", I want Cell J3 to show "4362|4365" and so on.

any help appreciated!
C
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

Forum statistics

Threads
1,203,241
Messages
6,054,338
Members
444,717
Latest member
melindanegron

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top