This is absolutely possible, but I would recommend a different approach:
=INDEX({"BFA","MFA","BA","MA","No"},MATCH(1,COUNTIF(I3,"*"&{"BFA","MFA","BA","MA",""}&"*"),0))
You can also put the items to look for in a range of cells and their results in the range next to them. So if you had the following setup:
_____A____ ___B__
1 Search For Return
2 BFA BFA
3 MFA MFA
4 BA BA
5 MA MA
6 No
Then the formula would look like this:
=INDEX($B$2:$B$6,MATCH(1,COUNTIF(I3,"*"&$A$2:$A$6&"*"),0))
For making it scalable and updatable I recommend putting what to search for and what that search should return if found in a range as shown. You could put it on a separate sheet or hide those columns if preferred.
SEARCH
can work like that... but you could just nest a fewIF(ISNUMBER(SEARCH(...)))
statements. LikeIF(ISNUMBER(SEARCH("BFA",I3)),"BFA",IF(ISNUMBER(SEARCH("MFA",I3)),"MFA",IF(...
– Bahia