+ Reply to Thread
Results 1 to 6 of 6

Filter a Combo Box

  1. #1
    Registered User
    Join Date
    09-18-2015
    Location
    New York
    MS-Off Ver
    2013
    Posts
    31

    Filter a Combo Box

    Hello Everyone,

    I am using the VBA code form the following website to achieve auto complete in a combo box with data validation:
    http://www.contextures.com/xlDataVal10.html

    Is it possible to make the combo box a filter as well as autocomplete? I'd like to type in any part of a word, and have it return all of the potential matches in the range it references, narrowing down as I type more of the word.

    I've attached the sample file with the code for reference.

    Thanks!
    Attached Files Attached Files
    Last edited by atdemeo; 05-20-2016 at 02:55 AM.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Filter a Combo Box

    I don't know why Microsoft added the functionality to Access but not Excel.

    The main issue with Excel is that it doesn't know anything is happening until you leave the cell. A long time ago I played with the buffer, but you have to put Excel into a special mode to intercept the buffer to get the keystrokes as you type them. I can't recall what I had to do. All I remember is that it was a hassle and made it more difficult to enter data.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    1,004

    Re: Filter a Combo Box

    Quote Originally Posted by atdemeo View Post
    Hello Everyone,
    Is it possible to make the combo box a filter as well as autocomplete? I'd like to type in any part of a word, and have it return all of the potential matches in the range it references, narrowing down as I type more of the word.
    This is an example of a combobox that 'search as you type':
    Please Login or Register  to view this content.
    The sample workbook:
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    09-18-2015
    Location
    New York
    MS-Off Ver
    2013
    Posts
    31

    Re: Filter a Combo Box

    Amazing. Thank you!!!

  5. #5
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    1,004

    Re: Filter a Combo Box

    Quote Originally Posted by atdemeo View Post
    Amazing. Thank you!!!
    You're welcome & thanks for the feedback

  6. #6
    Registered User
    Join Date
    09-18-2015
    Location
    New York
    MS-Off Ver
    2013
    Posts
    31

    Re: Filter a Combo Box

    I'm back!


    Would you be able to combine the combo box you supplied in your post with the script I have in the first post? I'm looking to get the search as you type box to appear on double click in a cell. I tried to combine it myself, but the code is a little over my head.

    Also, the search as you type only works if you type the items in the list in the correct order. Keeping with your example, how would I get the combo box to show Atlanta by typing lanta instead of Atla?

    Thanks,

+ 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. Combo box filter
    By Apollo4life in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2014, 06:43 PM
  2. Combo box filter
    By Apollo4life in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-02-2014, 06:39 PM
  3. Filter using combo box
    By sherlock1241 in forum Excel General
    Replies: 3
    Last Post: 02-09-2014, 08:29 AM
  4. Replies: 8
    Last Post: 12-26-2013, 02:23 PM
  5. Filter using Combo Box
    By 301eco in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-13-2012, 10:54 PM
  6. Great Combo Filter/Search form, cant get DATE filter to integrate. HELP
    By fau5tu5 in forum Access Programming / VBA / Macros
    Replies: 4
    Last Post: 05-18-2009, 05:05 PM
  7. filter from combo box? (not autofilter)
    By Excel idiot in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-19-2007, 05:31 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