Automatic categorisation of expenses


Hi there,

I think I’m looking for a combination of VLOOKUP and CONTAINS, but I’m not quite sure. Basically I have two tables:

description - cost - category
“papa johns 34532” - $34
“something from Facebook ads” - $54
“Hotel so and so” - $54

Lookup string - category
“papa johns” - restaurant
“Facebook” - advertising
“hotel” - travel

What I’d like to do is link the two tables, so that the expense table will have the category field automatically populated… IF the description contains a string found in the Rules table, then set the category to category of that table.

I’m not quite sure how to go about achieving this though?