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

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
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,224,823
Messages
6,181,185
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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