hi mlun. are you still using Excel 2003? you should change your profile for the MS-Off Ver if it has changed. that will enable us to give you newer & more efficient formulas. also, it's better if you can upload a sample excel file next time so that we don't have to re-create your data to test it out.
if you don't mind having the last match instead of first match, then;
=LOOKUP(2^15,SEARCH(Sheet2!$A$2:$A$5,A2),Sheet2!$B$2:$B$5)
if you want the first match, maybe this array formula:
Formula:
=IF(ISNA(LOOKUP(2^15,SEARCH(Sheet2!$A$2:$A$5,A2))),NA(),INDEX(Sheet2!$B$2:$B$5,MIN(IF(ISNUMBER(SEARCH(Sheet2!$A$2:$A$5,A2)),ROW(Sheet2!$A$2:$A$5)-ROW(Sheet2!$A$2)+1))))
...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
change all my commas to semi-colons if your separators are supposed to be semi-colons
Bookmarks