Forum Discussion
alex_n
May 04, 2023Brass Contributor
Excel VBA to filter a table based on multiple search criteria entry in ActiveX Control Textbox
Hello All, (This is a development of the thread Excel 365 ActiveX Textbox for "Search as you type" not working on second monitor - Microsoft Community Hub) I am seeking a solution to the belo...
- May 08, 2023
That is unavoidable; the code has to do a lot of work. In that case, I'd use a command button to filter, instead of reacting to every keystroke.
HansVogelaar
May 04, 2023MVP
AutoFilter cannot handle more than 2 criteria with wildcards.
Advanced Filter would be an alternative - you can assemble the criteria range in VBA.
Two other options are described in AutoFilter based on an array, more than 3 elements
alex_n
May 05, 2023Brass Contributor
Hans, thanks for the response. I think the version 2 solution posted on stackoverflow will work, but how do I link it to work with my file?
- HansVogelaarMay 05, 2023MVP
Do you want to show a row if
(1) the column contains ALL of the keywords, or
(2) the column contains at least ONE of the keywords?
- alex_nMay 05, 2023Brass ContributorHans, I want to show all rows that contain ALL keywords on AND basis.
Thanks,
Al- HansVogelaarMay 05, 2023MVP
See if the attached version does what you want.