Hello guys,
I have the following code:
strSearch is a string the user wants to find (with wildcards) from a shop's name and it returns the shops account number. Like a fuzzy lookup.
This is great and it returns the first store it finds. I want to change this so it returns all the stores it finds and I can ask the user which result it would like to view. Can I change the code so it returns a list/array of values from the table (both column a and b)?
I have the following code:
Code:
On Error Resume Next
strOut = Application.WorksheetFunction.VLookup(strSearch, Worksheets("StoreLookup").Range("A2:B2000"), 2, False)
strSearch is a string the user wants to find (with wildcards) from a shop's name and it returns the shops account number. Like a fuzzy lookup.
This is great and it returns the first store it finds. I want to change this so it returns all the stores it finds and I can ask the user which result it would like to view. Can I change the code so it returns a list/array of values from the table (both column a and b)?
Last edited: