+ Reply to Thread
Results 1 to 23 of 23

Drop List with a description but once chosen description disappear

  1. #1
    Registered User
    Join Date
    12-12-2016
    Location
    Alabama, United States
    MS-Off Ver
    Excel 2007
    Posts
    32

    Drop List with a description but once chosen description disappear

    Hello,

    I was wondering is there a way to create your drop list where in the drop down it has the Ingredient and description of Ingredient but once I choose my option it just display the Ingredient and not the description. For example, in the drop list (when the arrow is clicked on) it has:

    Eggs - yellow yoke
    Broccoli - green vegetable

    but once I choose Eggs, it just display "Eggs" in the cell and not "yellow yoke".

    Is it 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
    44,428

    Re: Drop List with a description but once chosen description disappear

    Is it possible?
    NAFAIAA. You could probably do it with VBA and some sort of flag/helper column.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    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


  3. #3
    Registered User
    Join Date
    12-12-2016
    Location
    Alabama, United States
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Drop List with a description but once chosen description disappear

    I'm not to good with VBA.

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Drop List with a description but once chosen description disappear

    How about a lookup table? Lookup the ingredient with descriptor but return the ingredient.

    Something like this?



    A
    B
    1
    Eggs - yellow yoke
    Eggs
    2
    Broccoli - green vegetable
    Broccoli
    Dave

  5. #5
    Registered User
    Join Date
    12-12-2016
    Location
    Alabama, United States
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Drop List with a description but once chosen description disappear

    Yes this could possibly work! How do I go about doing this?

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Drop List with a description but once chosen description disappear

    It would be easier to demonstrate with data like that you are working with.

    Try uploading a small Excel workbook with sample(s) (please no screen shots or pics ... they require retyping your data) of data validation, what you would like returned and where.

    You will usually get more and faster response if you do.

    If you are not familiar with how to do this:


    To attach a file to your post,
    • click “Go Advanced” (next to Post Quick Reply – bottom right),
    • scroll down until you see “Manage Attachments”, click that,
    • click “Browse”.
    • select your file(s)
    • click “Upload”
    • click “Close window”
    • click “Submit Reply”
    The file name will appear at the bottom of your reply.


    Please be sure to desensitize the data.

  7. #7
    Banned User!
    Join Date
    10-29-2012
    Location
    Europe
    MS-Off Ver
    2013, 2016
    Posts
    318

    Re: Drop List with a description but once chosen description disappear

    Wrong post. Sorry.
    Last edited by Indi_Ra; 12-13-2016 at 07:06 PM.

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Drop List with a description but once chosen description disappear

    Quote Originally Posted by TMS View Post
    NAFAIAA. You could probably do it with VBA and some sort of flag/helper column.
    Sample file here:

    http://www.contextures.com/excelfiles.html#DataVal

    Scroll down and look for:

    DV0004 - Data Validation Change
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  9. #9
    Forum Contributor
    Join Date
    05-02-2015
    Location
    calgary alberta
    MS-Off Ver
    2012
    Posts
    205

    Re: Drop List with a description but once chosen description disappear

    Why don't you give it a shot in a sample workbook and if you have questions once you have set things up post them back here?

  10. #10
    Registered User
    Join Date
    12-12-2016
    Location
    Alabama, United States
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Drop List with a description but once chosen description disappear

    sounds great I will try it out now!

  11. #11
    Registered User
    Join Date
    12-12-2016
    Location
    Alabama, United States
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Drop List with a description but once chosen description disappear

    This link is perfect for what I am trying to do. I tried to create a sample of my own and just use their coding instead of recreating the whole thing but I'm having trouble getting it to run. I watched Youtube tutorials on how to create VBA in excel but keep running into road blocks.

  12. #12
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Drop List with a description but once chosen description disappear

    Try posting in the Excel Programming / VBA / Macros subforum for a more targeted audience.

  13. #13
    Forum Contributor
    Join Date
    05-02-2015
    Location
    calgary alberta
    MS-Off Ver
    2012
    Posts
    205

    Re: Drop List with a description but once chosen description disappear

    Can you post what you have so far? Or even just a sample with what you are working with?

  14. #14
    Registered User
    Join Date
    12-12-2016
    Location
    Alabama, United States
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Drop List with a description but once chosen description disappear

    Hello I'm trying to attach my document but for some odd reason my file will not attach even after I followed the steps provided previously.
    Attached Files Attached Files

  15. #15
    Forum Contributor
    Join Date
    05-02-2015
    Location
    calgary alberta
    MS-Off Ver
    2012
    Posts
    205

    Re: Drop List with a description but once chosen description disappear

    It attached. So you want a drop down menus that when you select a product, in an adhacent cell the description and number will appear? Do you want this in a pop up window? On on the sheet itself

  16. #16
    Registered User
    Join Date
    12-12-2016
    Location
    Alabama, United States
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Drop List with a description but once chosen description disappear

    Yes that is correct, and on the sheet itself please.

  17. #17
    Registered User
    Join Date
    12-12-2016
    Location
    Alabama, United States
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Drop List with a description but once chosen description disappear

    Yes that is correct, and on the sheet itself please.

  18. #18
    Forum Contributor
    Join Date
    05-02-2015
    Location
    calgary alberta
    MS-Off Ver
    2012
    Posts
    205

    Re: Drop List with a description but once chosen description disappear

    see if this does what you would like?
    Attached Files Attached Files

  19. #19
    Registered User
    Join Date
    12-12-2016
    Location
    Alabama, United States
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Drop List with a description but once chosen description disappear

    When I try this code and click "Run", it brings up the screen "Macro Name" which I thought I already created a name. I'm not understanding why it will not Run.


    Public Sub my_macro(ByVal Target As Range)

    If Target.Cells.Count > 1 Then GoTo exitHandler

    If Target.Column = 2 Then
    If Target.Value = "" Then GoTo exitHandler
    Application.EnableEvents = False
    Target.Value = Worksheets("Codes").Range("A1") _
    .Offset(Application.WorksheetFunction _
    .Match(Target.Value, Worksheets("Codes").Range("ProdList"), 0), 0)
    End If

    exitHandler:
    Application.EnableEvents = True
    Exit Sub

    End Sub

  20. #20
    Forum Contributor
    Join Date
    05-02-2015
    Location
    calgary alberta
    MS-Off Ver
    2012
    Posts
    205

    Re: Drop List with a description but once chosen description disappear

    Well I'm really not sure what your doing there or where that code came from?

  21. #21
    Registered User
    Join Date
    12-12-2016
    Location
    Alabama, United States
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Drop List with a description but once chosen description disappear

    even when i try to follow your example that you provided to me in the "Dynamic combobox and listbox" it still prompt me to enter a Macro Name. I'm going to list the steps I take and can you tell me if I miss something.
    1. Open Workbook
    2. Proceed to VBA
    3. Insert Module
    4. Begin typing "Sub Worksheet_Change(ByVal Target As Range)
    5. Press Enter
    6.Begin to type the code you provided
    7. Save Macro and Workbook as .xlsm
    8. Proceed back to module, place cursor somewhere between my code
    9. Run Macro.

  22. #22
    Forum Contributor
    Join Date
    05-02-2015
    Location
    calgary alberta
    MS-Off Ver
    2012
    Posts
    205

    Re: Drop List with a description but once chosen description disappear

    Well you need to add the list and text boxes. And have them labeled properly. And you have to make sure you have the named range proper as well. If your. It strong with VBA taking what I have done and incorporating it into your own workbook might be hard for you of any of the ranges of data are different. Or the layout is different. Hence the reason why everyone here will suggest you alway provide a sample book clearly indicating what you have and expect to see. All you showed was an example of what you wanted via pic and then some simple sample data?

  23. #23
    Registered User
    Join Date
    12-12-2016
    Location
    Alabama, United States
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Drop List with a description but once chosen description disappear

    Got it to work! Thanks so much for your help!! They were labeled improperly.

+ 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. [SOLVED] Search and Extract text from a list of description
    By ADLT in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-16-2016, 02:23 AM
  2. drop list abbreviated from full description
    By scorpius68 in forum Excel General
    Replies: 3
    Last Post: 07-26-2013, 10:57 PM
  3. [SOLVED] Need macro that searches for a description based on a number from a drop down list
    By Peebly in forum Excel Programming / VBA / Macros
    Replies: 29
    Last Post: 02-28-2013, 07:02 PM
  4. Replies: 11
    Last Post: 12-24-2012, 03:41 PM
  5. Replies: 0
    Last Post: 08-16-2012, 02:01 PM
  6. List Box With Separate Description Box
    By Dean4931 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-13-2007, 01:34 PM
  7. short description:Drop Down List
    By dle in forum Excel General
    Replies: 1
    Last Post: 05-23-2006, 05:50 AM

Tags for this Thread

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