multiple vlookups in one cell?
I have a basic vlookup formula set up so that if you type a code in a cell, it defines the code in the cell next to it based on data in another worksheet.
Is it possible to put multiple codes in a cell and the output in the next cell would be each description separated by a comma?
72281 postlaminectomy syndrome, cervical region
71941 shoulder pain
In one cell I’d like to enter “72281,7840,71941” and in the cell would output the discreptions as “postlaminectomy syndrome, cervical region, headache, shoulder pain”
Also note that there could be any number of codes in a cell, not just 3.
Is this possible?
Re: multiple vlookups in one cell?
It's possible with a formula, but it would be messy, particularly the more codes you input.
I think you would also have to limit it to say, one, two or three codes. So, you'd count the commas to determine if the formula can cope, then separate them with FIND.
You could probably do it much more easily with a User Defined Function. That could be virtually unlimited as you could split the codes into an array, loop through it and build a string of descriptions. Of course, that's just the theory ...
Trevor Shuttleworth - Excel Aid
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Search Engine Friendly URLs by vBSEO 3.6.0 RC 1