+ Reply to Thread
Results 1 to 2 of 2

multiple vlookups in one cell?

  1. #1
    Registered User
    Join Date
    03-14-2013
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2010
    Posts
    1

    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
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    37,309

    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Bookmarks

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