Hi,
I am running a project on a big database of customers which require the following:
Step 1 - Search for a keyword (Worksheet = Search, B4) through various columns (Workseet = Data, Column B, F, J)
Step 2 - If the keyword is found in any column, copy and past that whole line on another sheet ("Worksheet II")
I was able to do step 1 and 2 with a small macro and some clever excel formulas (see Name_Search macro). Now I have to repeat these steps multiple times for various keywords. Please will you assist in building the code to do the following?
Step 3 - Given an array of multiple keywords (Worksheet = Search, B8 downwards), run Step 1 and Step 2 for each keyword but copy their associated "Possible TP Codes"and "Possible TP Names" in the columns provide in "Worksheet II".
Please find attached a model example.
Sub Name_Search()
Sheets("Worksheet II").Select
Cells(Application.Rows.Count, 1).End(xlUp).Offset(1, 0).Select
Range("array_data").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:= _
Range("criteria_name"), CopyToRange:=Cells(Application.Rows.Count, 1).End(xlUp).Offset(1, 0), Unique:=False
End Sub
Bookmarks