I have textbox1 inside the sheet (ACTIVEX ) and the code bleow search just based on first letter and first name . so what I want if I have many names into cells in column B then when I write the letter fo any location and for any name into cell ,then should filter and show the names which contain the letter up to finish writing ,then show the name based on whole word is written in textbox1 . for instance if I have two names in B8= "Alaa amir malla" then when I write any letter whether first or second or third name , then should filter and show the names contain the letter is written in textbox1 up to finish writing the whole name .
I hop some help
VBA Code:
Private Sub TextBox1_Change()
Dim MySerch As String
If ib Then Exit Sub
MySerch = CStr(Me.TextBox1)
Range("N3").Value = "=Search(""" & MySerch & """,B4)=1"
Me.Range("B3").Resize(Me.UsedRange.Rows.Count, 2).AdvancedFilter xlFilterInPlace, Me.Range("N2:N3")
End Sub