+ Reply to Thread
Results 1 to 6 of 6

Drop down list that displays descriptions

  1. #1
    Registered User
    Join Date
    07-26-2013
    Location
    Massachusetts
    MS-Off Ver
    Excel 2010
    Posts
    47

    Drop down list that displays descriptions

    I have a spreadsheet that I'm using to organize information that will be entered into a report. Being a government report, the abbreviations they want us to use aren't always intuitive. I've set up drop down lists using the Data Validation tool in my main sheet and the options are linked to cells in the second sheet. However, I'd like the drop down list to display what the abbreviations mean while selecting, but only display the abbreviation in the cell once chosen.

    For example, one question is:

    "What is the unit of measurement specified by the most stringent regulation?"

    The options in my drop down list are as follows:

    NH
    NM
    NP
    OT

    On my second sheet, where the options are linked from, I have two columns: Code and Description. So, it looks like this:

    Code | Description
    NH....| pounds per hour
    NM....| parts per million
    NP....| pounds ber mmBtu
    OT....| other

    I would like the drop down menu to show both the code and the decription while it's expanded, but only the selected code when entered. I'm not sure if this is possible. I would like to avoid using the VLOOKUP function in an adjacent cell, as is described on a few other help forums, because this portion of the report is 53 questions long (rows) and I have to enter the information for 46 units (columns) and having an extra column for each unit would be long and really unneccessary. One site recommends a combo box, but I don't understand how that works at all.

    There may not be a way, but if anyone has any ideas I'd appreciate any help!

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: Drop down list that displays descriptions

    Name your list of extended description options "ValuesList", and apply DV to the cells of interest using the list option, and =ValuesList as the source.

    Then copy this code, right-click the sheet tab, select "view code" and paste the code into the window that appears. You will need to save your workbook as a macro-enabled .xlsm file.

    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    07-26-2013
    Location
    Massachusetts
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: Drop down list that displays descriptions

    Thank you! That worked at first, but I broke it somehow. When I tested it for one list, it worked beautifully.

    However, I have 9 different drop down lists in my spreadsheet, so I defined the description sets with names ValuesList_1, ValuesList_2, etc. I used your code to create separate macros for each list and adjusted "=ValuesList" where it occurs in the code accordingly. Some of the abbreviations are three characters, so for those lists with longer codes I changed the 2 in line 11 of the code to a 3. Now none of them work and I'm not sure why

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: Drop down list that displays descriptions

    OK - you may have stopped your code after the events were turned off. To reset that, run this first

    Please Login or Register  to view this content.
    Then change the code to this to account for the various lengths and lists - make sure that whatever you want as the short entry is the leftmost part of the string, separated by a space from the description

    Please Login or Register  to view this content.
    Last edited by Bernie Deitrick; 06-27-2014 at 02:33 PM.

  5. #5
    Registered User
    Join Date
    07-26-2013
    Location
    Massachusetts
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: Drop down list that displays descriptions

    Amazing! Thank you so much, that works perfectly. I definitely could not have figured that out on my own c:

  6. #6
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: Drop down list that displays descriptions

    You're welcome - and thanks for letting me know that it worked!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Making Drop down list that displays data sourced from web
    By HelloMrAnderson in forum Excel General
    Replies: 4
    Last Post: 06-19-2014, 01:56 AM
  2. Help creating drop-down selection box that displays 2 columns
    By bubernak in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-01-2013, 11:47 AM
  3. [SOLVED] One drop box, one click displays information in excel fields.
    By drarmy in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 09-20-2012, 03:18 AM
  4. Replies: 0
    Last Post: 08-16-2012, 02:01 PM
  5. Create list of unique descriptions for each term
    By lae1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-26-2008, 04:16 PM

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