Improve company productivity with a Business Account.Sign Up
Private Sub TextBox1_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
Dim Column As Range
Dim mFilter As Integer
.AutoFilterMode = False
If Len(TextBox1.Value) > 0 Then
For Each Column In .AutoFilter.Range.Columns
.AutoFilter.Range.Cells(1, 1).AutoFilter Field:=Column.Column - .AutoFilter.Range.Column + 1, Visibledropdown:=False
mFilter = 1
Select Case ActiveSheet.Cells(3, 2).Value
mFilter = 1
mFilter = 2
mFilter = 3
mFilter = 4
mFilter = 5
mFilter = 6
mFilter = 7
mFilter = 8
mFilter = 9
mFilter = 10
.[B6:K20].AutoFilter Field:=mFilter, Criteria1:="=*" & TextBox1.Value & "*", Operator:=xlAnd
Open in new window
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.