Sorry, I was called away. A multi-celled solution is possible, but ugly. Here's a UDF:
Paste the code in a standard module:
1) Press ALT+F11 to open the Visual Basic Editor
2) Press ALT+I to access the Insert Menu
3) Press ALT+M to select Module
4) Paste the code in the window, then close the VBE (Visual Basic Editor).
Then (assuming the main string is in A2 and the "search string" is in B1) paste this in cell B2 and copy down:
NOTE: This is a MACRO, so you'll have to Save your workbook as Macro-Enabled. Select .xlsm file type when saving, then click OK.
Bookmarks