I was looking for this for ages, this will save me a lot of time with my personal finances. Just following on from Scott Craners reply this worked perfect for me- =IFERROR(INDEX(CC_Match,MATCH(TRUE,ISNUMBER(SEARCH(CC_Name,E2)),0),0,1),"NOT FOUND")
E2 is the cell with the value you want to lookup CC_Match is a named range for the Cost Centers you want to do a text search against. This list can include wildcards in the text CC_Name is a named range next to CC_Match for the actually Cost Center code you want.
Note- You have to organise the CC_Match list in priority from the top down. I did this just by sorting on length of the match string.
For example if this list was reversed every Credit would match to General Credit- CC_Match...................CC_Name Credit from Fred.........Phils Wage Credit from Company xyz..Lisa Wage Credit*....................General Credit