Filter the data using SEARCH BOX
(i)Consider a cell as serachbox
(ii)Consider a Textbox as searchbox
Private Sub TextBox1_Change()
Dim Sh As Worksheet
Set Sh = ActiveWorkbook.Sheets("Sheet2")
Dim FilterData As String
FilterData = Sh.Shapes("TextBox1").OLEFormat.Object.Object.Value
Sh.Range("A5").AutoFilter field:=Sh.Range("C2").Value, Criteria1:="*" & FilterData & "*", Operator:=xlFilterValues
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Sh As Worksheet
Set Sh = ActiveWorkbook.Sheets("Sheet2")
Dim CellRng As Range
Set CellRng = Intersect(Target, Sh.Range("C3"))
If Not CellRng Is Nothing Then
Sh.Range("A5").AutoFilter field:=Sh.Range("C2").Value, Criteria1:="*" & Sh.Range("C3").Value & "*", Operator:=xlFilterValues
End If
End Sub