Try array entering this formula in B1 of Sheet 1. Fill across about 4 or 5 columns and then fill down.
If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
Formula:
=IFERROR(SMALL(IF(ISNUMBER(FIND(Sheet2!$A$1:$A$19,'Sheet 1'!$A1)),ROW($A$1:$A$18)),COLUMNS($B$1:B$1)),"")
There is a second method in F1 as well. Same instructions.
Formula:
=IFERROR(SMALL(IF(COUNTIF($A1,"*"&Sheet2!$A$1:$A$19&"*"),ROW($A$1:$A$18)),COLUMNS($F$1:F$1)),"")
Bookmarks