Hello All,
I have added a search box that is linked to a cell and have it searching/filtering my table as I type. Now my issue is everything that I type in to search needs to be in the same order as my Description column in the Table. The problem with this is i have thousands of different items and not all of the verbiage follows a standard. Below is the code that I currently have. I added some buttons from youtube in hopes to fix this with no luck . Realistically my plan would be to remove the begins with and only search for contains if possible.
One Example being. My cell contains "Tel-Tru GT300R Thermometer Temp. Gauge - 0-250F , 3" Dial, 9" Stem Length, 1/2" MNPT Polycarbonate Lens". I would like to search "Thermometer 9" Stem Length 0-250F"
Any help/recommendation is appreciated! Thank you!
I have added a search box that is linked to a cell and have it searching/filtering my table as I type. Now my issue is everything that I type in to search needs to be in the same order as my Description column in the Table. The problem with this is i have thousands of different items and not all of the verbiage follows a standard. Below is the code that I currently have. I added some buttons from youtube in hopes to fix this with no luck . Realistically my plan would be to remove the begins with and only search for contains if possible.
One Example being. My cell contains "Tel-Tru GT300R Thermometer Temp. Gauge - 0-250F , 3" Dial, 9" Stem Length, 1/2" MNPT Polycarbonate Lens". I would like to search "Thermometer 9" Stem Length 0-250F"
Any help/recommendation is appreciated! Thank you!
VBA Code:
Private Sub BeginsWith_Click()
Call SearchBox_Change
End Sub
Private Sub Contains_Click()
Call SearchBox_Change
End Sub
Private Sub SearchBox_Change()
If optbeginsWith Then
ListObjects("PartsDatabase").Range.AutoFilter field:=6, Criteria1:=Range("F2") & "*"
Else
ListObjects("PartsDatabase").Range.AutoFilter field:=6, Criteria1:="*" & Range("F2") & "*"
End If
End Sub