+ Reply to Thread
Results 1 to 2 of 2

multiple vlookups in one cell?

  1. #1
    Registered User
    Join Date
    Minneapolis, MN
    MS-Off Ver
    Excel 2010

    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?
    For example:

    Table Data
    72281 postlaminectomy syndrome, cervical region
    7840 headache
    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?

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365

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

    Regards, TMS
    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1