• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Advanced search with several comboboxes

Visor

Member
Dear forum friends, I can not find a way to make a search using a single combobox or several comboboxes. Surely you have to use the "and" or "or" operators and show me in the listbox what corresponds based on what is shown in Sheet 2 (Resum)
I appreciate your kind collaboration
upload the file so you can see it
 

Attachments

  • Buscar con listbox.xlsm
    33.3 KB · Views: 16
I'm not sure what exactly you are trying to do here... is it all "AND" or all "OR" only?
In real-life situation, I'd imagine you'd want few of the fields set to "AND" and additional "OR" condition etc.

Why not use advanced filter copy? It's much more flexible than forcing use of combobox on users.
If you still wish to use userform, you can pass on the conditions set to criteria range.

See link for detail on how to set up criteria range etc.
https://www.contextures.com/exceladvancedfiltervba.html
 
Why not use advanced filter copy?
Thanks for your reply.
Actually, I do not know how to apply the vba to search by filtering vba by selecting in combobox what I want to filter.
As you will see the CbxAño searches and finds, (only this), ... but you are right is not very flexible. Now, what I filtered would like to see it in the Listbox but only what I need according to the header put in the example file. Once satisfied with the information, I sent it to the other sheet
 
Are you married to useform? This sort of setup is much easier to do, when worksheet is used as interface.
 
Thank you Chihiro

In a userform we can have control of all the sheets.


mmm! But, for your answer, .. I suppose that the search or filtering with combobox, can not be done in userform ...
 
It can be done. But it's very cumbersome to manage.

My take, why reinvent tools, when you have built-in tool that does the job for you.
 
For flexibility. ;)

Userform is useful when you want to validate user input prior to posting it on worksheet.
 
Back
Top