Try this macro
Sub Test()
Sheets("Raw Data").Activate
For N = 2 To Cells(Rows.Count, 2).End(xlUp).Row
For Each Cell In Sheets("S-Table").Cells(2, 2).CurrentRegion
If InStr(LCase(Cells(N, 4)), LCase(Cell.Value)) > 0 And Cell.Value <> "" And Cell.Row <> 2 Then
Cells(N, 6) = Sheets("S-Table").Cells(2, Cell.Column)
Exit For
End If
Next Cell
Next N
End Sub
Open up the VBA editor by hitting ALT F11
Insert a new module by hitting Insert - Module
Paste the macro into the empty sheet
Hit ALT F11 to get back to the worksheet.
Run the macro by going to tools-macro in Excel 2003 or the view ribbon in Excel 2007.
Bookmarks