Lookup Functions
Advanced

Wildcard lookup: contains, not starts with

Wrap the search text in asterisks to find it anywhere in the cell.

Task:

Bank lines carry long, messy descriptions; the payee's short name is somewhere inside each one. In C2:C5 return the cost category for each payee in A2:A5 by finding the description that contains it in E2:F6.

Interactive Spreadsheet

Hints

+5 XPno-hints bonus

Solve it on your own to keep the bonus. Each hint gets one step closer to the formula.

The data in this exercise

This is the grid you start with. Cell references in the task — B6, C2 — point at the row numbers and column letters below.

6 rows × 6 columns4 cells you fill in
ABCDEF
1PayeeCategoryBank descriptionCategory
2VODAFONEDD VODAFONE LTD REF 448291Phone
3SHELLCARD 4421 TESCO STORES 2231Groceries
4TESCOCARD 4421 SHELL GARAGE M4Fuel
5BTDD BT GROUP PLC 99120Broadband
6SO RENT FLAT 3Rent
What this exercise teachesMay contain the answer

A trailing asterisk alone finds text at the start; one on each side finds it anywhere. Be careful with short search terms: "BT" would also match any description containing "DEBT". The first match wins, so check that the shortest names are not swallowed by longer ones.