+ Reply to Thread
Results 1 to 5 of 5

How to create drop down list in Excel where each list item is based on two columns?

  1. #1
    Registered User
    Join Date
    02-09-2012
    Location
    Philippines
    MS-Off Ver
    2003
    Posts
    9

    How to create drop down list in Excel where each list item is based on two columns?

    In Sheet1 I have the following table:

    A1: Product ID B1: Description
    A2: 1101 B2: Eggs
    A3: 4367 B3: Oranges
    A4: 5433 B4: Cereals
    A5: 7789 B5: Rags

    In sheet 2, cells in column A will contain a drop-down list where the user can choose a product. However, the list items should look like this:

    1101 (Eggs)
    4367 (Oranges)
    5433 (Cereals)
    7789 (Rags)

    Is this possible with just an Excel formula or do I need a macro? I used to make drop-down lists by giving names to ranges but that only works when my list items need info only from a single column.

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: How to create drop down list in Excel where each list item is based on two column

    You'll need to use a helper column to join A & B values into the list item format you want.

    Say we use column-C
    C2: =A2& " ("&B2&")"

    On Sheet2, use Data validation, list option and set the list reference to the cells in the helper column
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Registered User
    Join Date
    02-09-2012
    Location
    Philippines
    MS-Off Ver
    2003
    Posts
    9

    Re: How to create drop down list in Excel where each list item is based on two column

    ^I tried your soution and it seems sensible, but it turns out I can't apply a name for the helper column because it contains derived values. Any workaround? Here's what I'm trying to set in Insert > Name > Define > Refers to:

    =OFFSET(Sheet1!$C$1,1,0,COUNTA($C:$C),1)

    That works perfectly with data in columns A and B but I guess that's because they are givens, not derived values.

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: How to create drop down list in Excel where each list item is based on two column

    Hi

    If i am not missing something, then i think that you can do it with easier way.

    Take a look to the example.

    Hope to helps you.
    Attached Files Attached Files
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  5. #5
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: How to create drop down list in Excel where each list item is based on two column

    I can't apply a name for the helper column because it contains derived values
    Whether the value is fixed or derived makes no difference

    This works for me:

    =OFFSET(Sheet1!$C$1,1,0,COUNTA(Sheet1!$C:$C),1)

+ 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