I have been using below VBA code to filter the data by typing starting words in textBox and it works great.
The issue i have been facing is when i type any numeric value and alpha middle, end or any other value that is available in filter range it does not work.
for example i have data in Col"C" that is
King
Tomb
River
Ocean
8899
1011
4568
I will type "Ki" or "To" or "Ri" starting words/value code will work.
when i type midlle, last or numeric value it will not work such as "mb", "ver", "ean" or any numeric value "4568", "11".
There could be any solution which can work this way.
You help will be appreciated.
Private Sub TextBox2_Change()
Dim textb_deger As String, bul As Range
Dim start As Long
On Error Resume Next
textb_deger = TextBox2.Value
start = Sheets("AutoFilter").Cells(Rows.Count, 3).End(xlUp).Row
Set bul = Range("C4:C" & start).Find(What:=textb_deger)
Application.Goto Reference:=Range(bul.Address), Scroll:=False
Selection.AutoFilter field:=3, Criteria1:=textb_deger & "*"
If textb_deger = "" Then
Selection.AutoFilter
ActiveWindow.ScrollRow = 1
End If
Set bul = Nothing
End Sub
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…