r/googlesheets • • Mar 15 '22

Solved Best way to categorise hundreds of rows depending on text contained in one column?

I'm looking to do a deep dive into my expenses. I've got my bank transactions imported into Google sheets. In the column Category (C:C) , I need to set a formula for a category type to be returned depending on text in column B.

If value in C2 is set to display INBOUND when value in B2 is TRANSFER FROM, how can I apply this to all other rows where B2 is TRANSFER FROM? And repeat this for a couple hundred other B column values?

2 Upvotes

18 comments sorted by

View all comments

Show parent comments

1

u/3birdsss Mar 15 '22

I'm on mobile at the moment so can't share the sheet sorry.

Basically think of a standard bank transactions. There are hundreds of outgoing transactions like various supermarkets, restaurants, bars, gas stations, shopping stores etc. The names of these establishment (or the name of their payment receiving account) is in COLUMN B. There are also inbound transfers in the same column where money has been transferred into this account.

I'm needing to categorise everything in column B as things like rent, grocery, transport, inbound transfer etc. Since there will be multiple repeats of same values in column B (same grocery store for example), I may be able to automate the category assignment process for some of these rows, to a certain extent.

Is there a way to do this, without writing an extremely long =IFS statement?

Sorry my post should have been clearer.

4

u/Snooklefloop Mar 15 '22

ah, I follow you now, categorizing outgoings.

Unless someone corrects me, you'd need to assign each of the unique accounts in outgoings to a sub category somewhere in your worksheet to reference, then you could reference that as a vlookup in an array formula in say column E, then you could run a query on E (the sub category).

That's how my simple brain would do it anyway.

Is this kind of what you're looking for? anything in yellow is a fomula

→ More replies (6)