Hunch

Categorize expenses in Google Sheets

Updated · Edoardo Panichi, maker of Hunch

=HUNCHPICK(text, options) reads one transaction description and returns the budget category it fits, chosen from the list you write. Point it at a bank or card export and every row gets a category, ready for a pivot, a SUMIF, or a QUERY.

Why a keyword rule breaks on a bank feed

A rule like "if the description contains hotel, mark it travel" works until a statement shows "WEWORK 285 FULTON ST", which is rent for one company and a coworking day pass for another, or "AMAZON MKTPLACE PMTS", which could be a book, a monitor stand, or an office chair. A keyword rule needs the exact word; a category formula needs only the meaning, and a bank feed rarely repeats the same merchant wording for long.

The formula

=HUNCHPICK(B2:B500, "software and subscriptions: SaaS tools, apps, cloud services|travel: flights, hotels, rideshare, parking, mileage|meals and entertainment: restaurants, coffee, client meals|office and supplies: equipment, furniture, stationery|advertising and marketing: ads, sponsorships, design tools|professional services: legal, accounting, contractors, consultants|rent and utilities: office rent, internet, power|other")

In Excel: =HUNCH.PICK(B2:B500, "software and subscriptions: SaaS tools, apps, cloud services|travel: flights, hotels, rideshare, parking, mileage|meals and entertainment: restaurants, coffee, client meals|office and supplies: equipment, furniture, stationery|advertising and marketing: ads, sponsorships, design tools|professional services: legal, accounting, contractors, consultants|rent and utilities: office rent, internet, power|other")

Each option carries its own definition after a colon, so travel and meals and entertainment do not fight over a rideshare receipt to a client dinner. The category names are clear enough that the default question works: no third argument needed. Full syntax is on the HUNCHPICK reference.

Real outputs

Nine lines from a card statement export, with the model's answers as returned on 28 September 2026.

RowAB
1Transaction descriptionCategory
2SQ *BLUE BOTTLE COFFEE SAN FRANCISCO CAmeals and entertainment
3AWS.AMAZON.COM SEATTLE WAsoftware and subscriptions
4DELTA AIR 006 2341234567 ATLANTA GAtravel
5GOOGLE *ADS MOUNTAIN VIEW CAadvertising and marketing
6WEWORK 285 FULTON ST NEW YORK NYrent and utilities
7STAPLES STORE #4471 DENVER COoffice and supplies
8LEGALZOOM.COM LOS ANGELES CAprofessional services
9COMCAST CABLE COMM PHILADELPHIA PArent and utilities
10UBER TRIP HELP.UBER.COMtravel

Every line lands on a specific category, none in other, because the merchant shorthand carries more signal than it looks like at first read: LEGALZOOM.COM reads as professional services and GOOGLE *ADS as advertising and marketing without anyone needing to expand the abbreviation first. WEWORK is read as rent and utilities, the coworking-membership reading rather than a one-off day pass, worth checking against your own vendor if the two ever land on the same statement.

Where the category list runs out

A statement always has a few lines that do not match anything on the list cleanly. These are worth reading before you trust the column for a full quarter.

RowAB
1Transaction descriptionCategory
2AMAZON MKTPLACE PMTS AMZN.COM/BILL WAother
3PAYPAL *NETFLIX 4029357733software and subscriptions
4CHEVRON 0091234 SAN JOSE CAother
5APPLE.COM/BILL 866-712-7753 CAsoftware and subscriptions
6INDEED.COM 512-605-1739professional services
7DOORDASH*THAI PLACE SAN FRANCISCO CAmeals and entertainment

AMAZON MKTPLACE PMTS and the Chevron gas station both land in other, exactly the generic-merchant and fuel-purchase cases the category list does not name directly. PAYPAL *NETFLIX lands on software and subscriptions, the closest available option for a subscription that is not SaaS; if personal-style subscriptions need their own line for expense policy reasons, add a category rather than leaving Netflix and a CRM bill in the same bucket. INDEED.COM reads as professional services over advertising and marketing, a reasonable pick for a recruiting cost but one worth its own definition if your team argues about where hiring spend belongs.

Read whatever lands in other once a month. If the same kind of line keeps landing there, add a category for it instead of leaving the bucket to grow.

Totals stay in normal formulas

The category column is text. Amounts, dates, and totals stay exactly where they already are, in SUMIF and QUERY, not in the model.

=SUMIF(C2:C500, "travel", D2:D500)
=QUERY(A1:D500, "select C, sum(D) where C is not null group by C order by sum(D) desc label sum(D) 'total'")

Column C is the category from HUNCHPICK, column D the amount from the export. Neither formula asks the model anything; they read the column it already filled. A pivot table on the same two columns gives the same total a different way, category down the rows, month across the columns, if that is the view your finance lead already trusts.

Keep the category column even after you build the summary. Next month's statement is new rows, and the summary formulas above pick up whatever the category column contains, no rebuilding required.

Limits

Copy the template to try this on your own export. The product categorization guide and the general classification guide cover the same HUNCHPICK pattern on other kinds of text.

Questions

Does it use the amount to help decide the category?
No. It judges only the text you give it. Combine the category column with SUMIF or a pivot on the amount column for totals; the two never need to touch inside the formula.
What about a merchant name with no useful words in it?
A code like a processor ID with no merchant name gives the model little to work with, and the read leans toward other or a low-confidence guess. Add a memo column if your export has one, and concatenate it into the text you send.
Can it return my chart of accounts number instead of a category name?
Not directly. Keep the option list in words, then VLOOKUP the returned label against a small chart of accounts table to get the number your bookkeeping software expects.
Will recategorizing next month's statement cost credits for merchants I already categorized?
Identical text within one call is free, and results stay cached for six hours, so reopening the same sheet does not spend anything. A new month is new transaction text, so it does cost one credit per row.
Can I flag recurring subscriptions separately from the category?
Yes, a second column: =HUNCH(B2:B500, "Does this look like a recurring subscription charge rather than a one-time purchase?") returns a probability you can filter on, independent of which budget category the charge landed in.

Run it on your own column

Copy the template (or use the Excel add-in), paste your key, point the formula at your data. Every formula here has its Excel spelling underneath. 100 rows free to start, then $29 for 5,000 rows. Credits never expire and there is no subscription.

Reference: HUNCHPICK

More guides