PDA

View Full Version : [SOLVED:] Search in multiple columns while Autofiltering - Excel VBA



kingripper9
01-09-2021, 06:21 AM
Experts,

I need your assistance please. I have 1 textbox (search box) and I like that textbox to search in 3 columns or more while it is autofiltering. Is it possible?..
Please see attached.

Thank you very much

p45cal
01-09-2021, 11:43 AM
The attached uses advanced filter rather than Autofilter.
The textbox is linked to cell F2, which is in turn used to fill in the Advanced filter criteria range G1:I4 via formulae.
Every time the textbox changes the advanced filter is executed. Emptying the textbox shows all the table rows unfiltered.
Of course, cells F2 and G1:I4 don't need to be where they are, they can even be on a different sheet, hidden or not.

kingripper9
01-10-2021, 12:59 AM
The attached uses advanced filter rather than Autofilter.
The textbox is linked to cell F2, which is in turn used to fill in the Advanced filter criteria range G1:I4 via formulae.
Every time the textbox changes the advanced filter is executed. Emptying the textbox shows all the table rows unfiltered.
Of course, cells F2 and G1:I4 don't need to be where they are, they can even be on a different sheet, hidden or not.

thank you very much sir..really appreciate your help..