Hi All,
I need to filter the data in Column B, starting from row 14, with 3 criteria. I have the code to filter that can do only in 2 criteria, would you please help me to modify the code as below :
Private Sub CommandButton1_Click()
Dim kriteria1 As String
Dim kriteria2 As String
kriteria1 = "*" & Me.TextBox1.Value & "*"
kriteria2 = "*" & Me.TextBox2.Value & "*"
Me.TextBox1.SetFocus
'check for a value & show message
If kriteria1 = "" Then 'the textbox in userform
Me.TextBox1.SetFocus
MsgBox "Please enter a value to find." ' show message if no value entered
Exit Sub
Else
Sheets("SUMMARY").Select
Range("A13:EK13").Select
Selection.AutoFilter
Selection.AutoFilter Field:=2, Criteria1:=kriteria1, Operator:=xlAnd, _
Criteria2:=kriteria2
Beep
End If
End Sub
Thank in advance![]()
Bookmarks