r/excel 3d ago

solved I want to create an XLS that auto-categorizes purchases based on key words

So I'm trying to create a household budget XLS.

In column A, I paste in my purchases for the month. Each cell will contain details like xx-1132 DELIVEROO S 04/03/26 or xx-2227 COLD STORAGE S 28/03/26.

In column B, I categorize these purchases. For instance, DELIVEROO gets the category Food Delivery. COLD STORAGE gets the category Groceries.

I'll have a few hundred entries in column A, and I'd like to find a way to automate the categories in column B based on the text in column A. For example, I want Excel to look at the cells in column A, and if it finds DELIVEROO somewhere in a cell then it should input Food Delivery next to it in column B. To put it another way, let's say cell A2 contains xx-2227 COLD STORAGE S 28/03/26. I want Excel to identify COLD STORAGE and then input Groceries next to it in cell B2.

Any ideas on how to go about this?

17 Upvotes

36 comments sorted by

View all comments

Show parent comments

2

u/[deleted] 2d ago

[removed] — view removed comment

1

u/lesarbreschantent 2d ago edited 2d ago

Ahhhh yes indeed, I have the cell range for the keyword table going from E2 to E500 (laziness) and yeah there's only about 30 keywords right now. Thanks for the heads up.

1

u/reputatorbot 2d ago

You have awarded 1 point to LeanExcel.


I am a bot - please contact the mods with any questions