Dynamic excel filter 2 items at same time.

louai

New Member
Joined
Nov 4, 2018
Messages
8
Hello,


Is it possible to get this to work? Please check the test file below.



The target is getting tho rows at the same time when i search for like example opel+nissan

test.png



Test file:
https://ufile.io/xmpqu
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Try this:-
Code:
[COLOR="Navy"]Sub[/COLOR] MG26Nov26
Private [COLOR="Navy"]Sub[/COLOR] TextBox1_Change()
[COLOR="Navy"]Dim[/COLOR] Ray [COLOR="Navy"]As[/COLOR] Variant
[COLOR="Navy"]If[/COLOR] Len(TextBox1.Value) = 0 [COLOR="Navy"]Then[/COLOR]
    Sheet1.AutoFilterMode = False
    [COLOR="Navy"]Else[/COLOR]
        [COLOR="Navy"]If[/COLOR] Sheet1.AutoFilterMode = True [COLOR="Navy"]Then[/COLOR]
            Sheet1.AutoFilterMode = False
        [COLOR="Navy"]End[/COLOR] If
    Ray = Split(TextBox1, "+")
    Sheet1.Range("A2:F" & Rows.Count).AutoFilter field:=1, Criteria1:=Ray, Operator:=xlFilterValues  
    [COLOR="Navy"]End[/COLOR] If
 
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]

[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Regards Mick
 
Last edited:
Upvote 0
Hello Mick,


wooooooow :) you are really a excel master!!!!


It worked for me and iam really impressed about your skills!!!!




Thankss
 
Upvote 0

Forum statistics

Threads
1,223,705
Messages
6,173,996
Members
452,542
Latest member
Bricklin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top