Function mylookup(myword As Range, mybook As Range, mycol As Integer) Dim mysht As Worksheet Set mysht = ActiveSheet maxrow = mysht.UsedRange.Rows.Count For i = 1 To maxrow If myword .Value Like "*" mybook .Cells(i, 1) "*" Then myresult = myresult "," mybook.Cells(i, mycol).Value ...