• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 301
  • Last Modified:

Double textbox for autofilter

Good morning everyone
i have a list of employee
 mainuw.png

 i need to make double autofilter means when i click textbox1 it will list the names ,textbox2 will filter the jobs as mentioned in the picture
 main2n.png

Doubts:
1- how to search first name and last name means sarah gellar without typing michelle
2- how to make double filter in the textbox2 as mentioned in the second image
the code
 
Sub Macro1()
Dim lastrow As Long
lastrow = Range("b65535").End(xlUp).Row
If ActiveSheet.TextBox1.Text <> "" Then

Range("A3:C3").AutoFilter
ActiveSheet.Range("$A$3:$c$" & lastrow).AutoFilter field:=2, Criteria1:= _
"=" & ActiveSheet.TextBox1.Text & "*", Operator:=xlOr
Else
ActiveSheet.Range("$A$3:$c$" & lastrow).AutoFilter field:=2
End If
End Sub

Open in new window


any help "I would appreciated.
0
msb20
Asked:
msb20
1 Solution
 
rowanscottCommented:
Hi

Ive made this to see if it does what you need. Book1.xlsm
0
 
msb20Author Commented:
ur great man

Thanks alot
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now