+ Reply to Thread
Results 1 to 5 of 5

Dynamic Combobox searchfucntions 'Indirect' dropdownlist (VBA) (MS Office Excel Pro 2016)

  1. #1
    Registered User
    Join Date
    05-23-2018
    Location
    nederland
    MS-Off Ver
    2016
    Posts
    26

    Dynamic Combobox searchfucntions 'Indirect' dropdownlist (VBA) (MS Office Excel Pro 2016)

    Hi Forum,

    I'm kind of stuck with this issue for 2 months now. I'm trying to create a userfriendly searchfunction for my food database which consists over 10000 item lines.
    I already have created defined names, and created 2 columns with a few dropdownlists that indirectly link the data chosen in the first dropdown, so the coresponding next data will show in the next dropdown. The lists are still too long, so a decent searchfunction is needed. I figured the only way in excel for this to happen is with a combobox, so i got a combobox now with some additional scripts to convert the 'indirect' function from datavalidation to a vba readable version.
    So what's not working yet?
    1st. - when i type in the searchbox it will only show the first looked up searchresult in the combobox dropdown, only after pressing enter and reselecting the combobox with the remaining searchword in it, it'll show the full searched list.

    2nd. - Is it possible to filter the dropdownlist either in the combobox or both in the combobox and the normal cell in alphabetical order without having to sort my actual datatable?
    In the attachement there is a link for an example workbook with a similar simulated problemcase and vbascripting.


    Thanks in advance for the help.

    Kind regards,

    Arnoud Holtzer
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by arnoudholtzer; 06-03-2018 at 11:06 AM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,750

    Re: Dynamic Combobox searchfucntions 'Indirect' dropdownlist (VBA) (MS Office Excel Pro 20

    Welcome to the Forum!

    An image attachment has very little value. Just attach the Excel file. It's easier than taking a screenshot first and then attaching that.

    It will be much easier to understand your problem if you provide your file. This allows us to see and experiment with your data, layout, formulas, code, and possibly attach a file with a completed solution. If you are looking for formulas to produce a desired result, it helps if you create a mock-up of what you want the result to look like. Otherwise we would have to build something from scratch, trying to guess what you want it to look like.

    The paper clip icon does not work for attachments. Instead, under the text box where you type your reply click the Go Advanced button. On the next screen scroll down and click on Manage Attachments, which will show a pop-up window to Select and Upload a file. Then close the window.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    05-23-2018
    Location
    nederland
    MS-Off Ver
    2016
    Posts
    26

    Re: Dynamic Combobox searchfucntions 'Indirect' dropdownlist (VBA) (MS Office Excel Pro 20

    Hi Jeff,

    Thanks for the reply,

    I had the message for not being allowed to place external links. Now i got the workbook uploaded as attachement in the first post.
    I hope this will help in getting towards a sollution. If more information or action is needed please let me know.
    The screenshots where to help show the action taken to simulate the 1st dropdownissue.

    Kind regards,

    Arnoud Holtzer
    Last edited by arnoudholtzer; 06-03-2018 at 11:10 AM.

  4. #4
    Registered User
    Join Date
    05-23-2018
    Location
    nederland
    MS-Off Ver
    2016
    Posts
    26

    Re: Dynamic Combobox searchfucntions 'Indirect' dropdownlist (VBA) (MS Office Excel Pro 20

    Hi all,

    If anyone can still help me with finding a solution for my 2 stated problem cases i would be very gratefull.
    Thanks in advance.

    Kind regards,

    Arnoud

  5. #5
    Registered User
    Join Date
    05-23-2018
    Location
    nederland
    MS-Off Ver
    2016
    Posts
    26

    Re: Dynamic Combobox searchfucntions 'Indirect' dropdownlist (VBA) (MS Office Excel Pro 20

    Hi,

    I got a lot further now, but i still need a little help with one small problem.

    I got the dependent dropdown menu's working within the combobox, including a properly working searchfunction, however there's one downside in the searchfunction, which is that when a searchterm is entered, only the first found result will be displayed in the dropdownmenu, where if the dropdownarrow is being clicked after that, it'll show only then the entire searchresultlist. This is not super userfriendly, so i hope you guys can help me out with this.

    I think the code below might need some alteration or additional lines or perhaps it's some other code. I'm not that great with coding in VBA that i can do this myself.

    Here's the code below where i think the problem lies, however the full comboboxscript is much longer:

    End Select
    .ListFillRange = "" 'clear all items
    'Repopulate with matched items
    .Clear
    For i = LBound(v, 1) To UBound(v, 1)
    If LCase(v(i, 1)) Like "*" & LCase(.Value) & "*" Then
    .AddItem v(i, 1)
    End If
    Next i
    Else
    'Repopulate with all items
    .ListFillRange = strV
    Select Case rngL.Column
    Case 1
    rngL.Offset(0, 1).ClearContents
    End Select
    In the attachement you'll find the full exampledocument with working dependent dropdownmenu's, working in the combobox as well and a working searchfuntion, but with the problem as stated below. This can be found in the 2nd worksheet. (sorry if some text is in dutch, but it won't matter for the stated problem).



    also 3 printscreens of the problem excersised in the combobox as an example:


    Thanks in advance for the help
    Attached Images Attached Images
    Attached Files Attached Files

+ 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. excel & office 2016 for £10 ???
    By Trebor777 in forum Excel General
    Replies: 2
    Last Post: 10-31-2017, 02:39 PM
  2. Replies: 1
    Last Post: 12-18-2016, 11:47 PM
  3. Replies: 1
    Last Post: 08-07-2016, 05:52 PM
  4. [SOLVED] Code not working in Office 2010 and Office 2016
    By amitmodi_mrt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-21-2016, 02:48 PM
  5. Replies: 2
    Last Post: 05-24-2016, 10:43 PM
  6. Default excel template in Office 2016?
    By honeybadger_rgr in forum Excel General
    Replies: 0
    Last Post: 12-10-2015, 12:19 PM
  7. To make a Dynamic Search DropDownList in UserForm.ComboBox
    By gnaske in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 09-08-2015, 05:56 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