I have a list of data (20,000+ products) there is different pricing depending on a condition of the product, users need the ability to look up product pricing at certain grades quickly, my current challenge is using vlookup's fail as often the users will just keyword search and not have the exact description. I want to leave in the existing lookup using vlookup as that will remain a quick search when the user has the exact product title but want to add an advanced search in when they only have a keyword (I have tried data validation searchable lists but they are slow and unreliable)
I have created a Listbox but can't get the code to search my data set and then display the results,
this is the code I'm using (Stock data has all my products and pricing) and my 2nd sheet is called Search where I want users to find what they are looking for
enter code here
Private Sub cmdsearch_click()
Dim Rownum As Long
Dim Searchrow As Long
Rownum = 2
Searchrow = 2
Worksheets("Stock Data").Activate
Do Until Cells(Rownum, 1).Value = ""
If InStr(1, Cells(Rownum, 1).Value, txtkeywords.Value, vbTextCompare) > 0 Then
Worksheets("Sheet1").Cells(Searchrow, 1).Value = Cells(rownnum, 1).Value
Worksheets("Sheet1").Cells(Searchrow, 2).Value = Cells(rownnum, 2).Value
Worksheets("Sheet1").Cells(Searchrow, 3).Value = Cells(rownnum, 3).Value
Searchrow = Searchrow + 1
End If
Rownum = Rownum + 1
Loop
If Searchrow = 2 Then
MsgBox "Sorry No products found, please request a price"
End If
Lstsearchresults.RowSource = "SearchResults"
End Sub