Multiple criterias filter using Command Button

kenji31

New Member
Joined
Feb 26, 2018
Messages
3
Hello everyone!

I want to create a very user-friendly interface on excel, which allows the user to filter a table as an automatic filter or slicer would do. In order to do it, I tried to use VBA and some macros.
I am stuck for few days now, and begin to get desperate :(... That is why I am posting here!!

The working of my excel is simple:

  • The user would have the choice between a bunch of criterias, sorted according 3 categories: Actor, Ranking and Tag.
(https://ibb.co/ehjGQx)


  • Once he selected the criterias, he would have to click on the button 'Search'.
(https://ibb.co/nRyRQx)


  • By doing so, he will be directed to the spreadsheet 'Search Result' which will show him a filtered table.
(https://ibb.co/kwqedH)

You can find the excel file at: https://uploadfiles.io/n8e5t so you can see better what I mean.



Thank you in advance for your help!!!
 

Some videos you may like

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

HackSlash

Active Member
Joined
Nov 18, 2016
Messages
360
The first help I will give you is that you should be making a form if your intent is a user interface. VBA forms are just like real VB6 application interfaces. It will look and function much better than object placed on a sheet. This will also make accessing the form with code much easier. It is extremely cumbersome to reference sheet objects from VBA code. Trust me. It's worth doing it correctly here:

http://www.excel-easy.com/vba/userform.html
 

kenji31

New Member
Joined
Feb 26, 2018
Messages
3
Hey HackSlash!

Thank you for your prompt reply! I'm taking your advice into account!

Do you think I would be able to realize my project using the userforms?

Thanks again!
 

HackSlash

Active Member
Joined
Nov 18, 2016
Messages
360
Yes, you can make the window "non-modal" so that the windows stays open while the results change in the spreadsheet behind. To reference the spreadsheet from the form I like to use "ThisWorkBook." so my code runs against the spreadsheet it lives within. This gets you away from problems that can arise from having multiple spreadsheets open.
 

Watch MrExcel Video

Forum statistics

Threads
1,109,007
Messages
5,526,248
Members
409,689
Latest member
martin_br

This Week's Hot Topics

Top