+ Reply to Thread
Results 1 to 15 of 15

Searchable dependent drop-down list

  1. #1
    Forum Contributor banaanas's Avatar
    Join Date
    08-26-2014
    Location
    Finland
    MS-Off Ver
    2016
    Posts
    199

    Searchable dependent drop-down list

    Hi!

    I got a dependent drop-down list on my excel, is it somehow possible to make it searchable?

    Currently it is like this:

    Cell B8: select product group (Drop down)

    Cell B9-B179 Select product status (Dependet on B8 drop down)

    I want to be able to search the product status in cells B9-B179
    (we got over 55 different statuses all starting with a number code, its a bit of a hazzle)

  2. #2
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Searchable dependent drop-down list

    Not sure what your question is. When a value is in a cell from a dropdown, it behaves just as if someone typed it in, so, yes, you can search for it.
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

  3. #3
    Forum Contributor banaanas's Avatar
    Join Date
    08-26-2014
    Location
    Finland
    MS-Off Ver
    2016
    Posts
    199

    Re: Searchable dependent drop-down list

    I am trying to achieve this:

    https://www.youtube.com/watch?v=vOOuSe_s6pQ

    Here is my example workbook:
    Example.xls

    Sheet "Koodit" contains the source for my dependant lists.

    On sheet "Laskentapohja" Cell B8 has the first list and cells B9-B179 has the second dependant list.

    I am sorry, english is not my native language and I hope the video will clear what i am trying to achieve.

  4. #4
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Searchable dependent drop-down list

    Okay. The video shows how to use a combo-box for your data selection. Interesting trick, as it allows you to auto-complete. I am lost on what you are considering to be 'search'. The video shows how it can auto-complete, which is a type of search, so I think you want something more...

  5. #5
    Forum Contributor banaanas's Avatar
    Join Date
    08-26-2014
    Location
    Finland
    MS-Off Ver
    2016
    Posts
    199

    Re: Searchable dependent drop-down list

    Quote Originally Posted by Pauleyb View Post
    Okay. The video shows how to use a combo-box for your data selection. Interesting trick, as it allows you to auto-complete. I am lost on what you are considering to be 'search'. The video shows how it can auto-complete, which is a type of search, so I think you want something more...
    Yeah I meant autocomplete. That is excatly what I need.
    I tried to follow the instructions in the video, without getting it to work.

  6. #6
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Searchable dependent drop-down list

    Since English is not your first language (you seem to be doing well, though), I'm not sure what you understood from the video. So, my questions may seem obvious, but I want to make sure we are synchronized.
    1) Did you download her spreadsheet from her website? It should have the VBA to make it work.
    2) Assuming you did download her spreadsheet, is her spreadsheet working on your computer?
    3) Did you try to copy her code into your spreadsheet? I don't think so, since you attached a .xls file which does not have macros.

  7. #7
    Forum Contributor banaanas's Avatar
    Join Date
    08-26-2014
    Location
    Finland
    MS-Off Ver
    2016
    Posts
    199

    Re: Searchable dependent drop-down list

    Quote Originally Posted by Pauleyb View Post
    Since English is not your first language (you seem to be doing well, though), I'm not sure what you understood from the video. So, my questions may seem obvious, but I want to make sure we are synchronized.
    1) Did you download her spreadsheet from her website? It should have the VBA to make it work.
    2) Assuming you did download her spreadsheet, is her spreadsheet working on your computer?
    3) Did you try to copy her code into your spreadsheet? I don't think so, since you attached a .xls file which does not have macros.

    1. Yes
    2. Yes
    3. Yes, the attached file is a stripped version of my real excel file (wich is a .xlsm file)
    Got a lot of company stuff in the "real" excel it that had to be removed (macros etch)
    I only left the sheets / data related to this topic in the example file, forgot to make it a .xlsm

    My personal guess what might be causing trouble is that I want to use suggestion in a dependant dropdown box.
    Last edited by banaanas; 01-16-2015 at 04:58 PM.

  8. #8
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Searchable dependent drop-down list

    A standard drop-down box does not allow the auto-complete feature. You will need to modify her code to your needs. Is your problem that you are having difficulty modifying her code to your spreadsheet?

  9. #9
    Forum Contributor banaanas's Avatar
    Join Date
    08-26-2014
    Location
    Finland
    MS-Off Ver
    2016
    Posts
    199

    Re: Searchable dependent drop-down list

    Quote Originally Posted by Pauleyb View Post
    A standard drop-down box does not allow the auto-complete feature. You will need to modify her code to your needs. Is your problem that you are having difficulty modifying her code to your spreadsheet?
    Yes, nothing that I have tried seems to work.

    I got the part of the code working that whenever i double click a cell witch contains a drop-down menu the activex-box pops out, but the suggestion part do not work.

  10. #10
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Searchable dependent drop-down list

    I played around a bit with her code and your spreadsheet. I assume you are following the directions on her website on how to set the MatchEntry property to 1-frmMatchEntryComplete in order to have the auto-complete enabled. A couple of things:

    1) Auto-complete is not a search for the word at any place in the list. It only goes by first letter, then second letter, etc. e.g. If you have a list item called "My Test", you cannot start typing "Test" and it will find "My Test". You can only start at the beginning, so that if you start typing "M" it will go to the first list item that begins with "M", then if you type a "y" next (so that you have "My") then it will go to the first list item that begins with "My".
    2) Her code only works if your data validation list is in columns. You chose a named range that is a row.

  11. #11
    Forum Contributor banaanas's Avatar
    Join Date
    08-26-2014
    Location
    Finland
    MS-Off Ver
    2016
    Posts
    199

    Re: Searchable dependent drop-down list

    Well that is a bummer, I can't change it to columns. I also tried to follow this:

    http://www.contextures.com/xlDataVal11.html

    But without any results.

  12. #12
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Searchable dependent drop-down list

    Well, you could probably change the code to take in the row of data and transpose it to the proper format. Or, and this would be easier, just transpose the row to an unused part of your spreadsheet and use that reference. Or, (and I haven't tried this, but it may work), put =TRANSPOSE(your range name) in the Name manager definition.

  13. #13
    Forum Contributor banaanas's Avatar
    Join Date
    08-26-2014
    Location
    Finland
    MS-Off Ver
    2016
    Posts
    199

    Re: Searchable dependent drop-down list

    Phew, 3 days of hard studing and remaking my whole excel file I got it finally to work.

    The code that I ended up using:

    Please Login or Register  to view this content.
    One more question though, is there any way to modify this bit of code to search for the word anywhere in the list? For example
    showing both Automotive and Automatically when typing auto?

  14. #14
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Searchable dependent drop-down list

    First, good job getting the code to work. I can't see what you did to have it support datalists that are in rows. I'm working from memory on the connexion code, but I don't see anything that converts the row to a column...

    Second, I'm not sure if you can show multiple matches. A part of me believes you could key off of keypress events and determine if they are in a combo box, and, if so, then create the matching list through code, and then repopulate the combobox with the new matching list. But, I'm not sure if keydown events in a combobox are captured, and it would be tricky to continuously capture the typed in text and re-create the combobox with the new list. Doesn't seem impossible, but I have never tried it.

  15. #15
    Forum Contributor banaanas's Avatar
    Join Date
    08-26-2014
    Location
    Finland
    MS-Off Ver
    2016
    Posts
    199

    Re: Searchable dependent drop-down list

    Quote Originally Posted by Pauleyb View Post
    First, good job getting the code to work. I can't see what you did to have it support datalists that are in rows. I'm working from memory on the connexion code, but I don't see anything that converts the row to a column...

    Second, I'm not sure if you can show multiple matches. A part of me believes you could key off of keypress events and determine if they are in a combo box, and, if so, then create the matching list through code, and then repopulate the combobox with the new matching list. But, I'm not sure if keydown events in a combobox are captured, and it would be tricky to continuously capture the typed in text and re-create the combobox with the new list. Doesn't seem impossible, but I have never tried it.
    I got it working simply by rebuilding my excel file and making the data in a column instead of a row, had to change more than 40 excel files + connections but in the end it was worth it :D

    And yeah, that do sound a bit tricky and well beyond my skill level, got to keep looking for something easier to implement.

+ 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. Searchable Drop Down List-Multiple Lines
    By simple? in forum Excel General
    Replies: 6
    Last Post: 10-13-2016, 06:07 AM
  2. Searchable Drop down list
    By Jesscyca in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-21-2014, 11:03 AM
  3. Open the Searchable Drop Down List on Enter
    By uberathlete in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-09-2014, 05:36 PM
  4. [SOLVED] Dependent Drop down list with DEPENDENT DEFAULT VALUE
    By ginieman in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 10-28-2013, 03:56 AM
  5. [SOLVED] Dependent Drop down list with DEPENDENT DEFAULT VALUE (e.g. Blank)
    By Waqar Ali in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-26-2012, 06:31 AM

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