Categorize products in Google Sheets
=HUNCHPICK(text, options, question, as) reads a product title and returns the category it fits, chosen from a taxonomy you describe. Add "confidence" as the fourth argument and the same pair of formulas also returns how sure the model is, so the uncertain rows sort to the top for a person to check.
A catalog feed rarely has a category field worth trusting
Products arrive from several vendors, each with its own naming habit and its own idea of what counts as a category, or with no category field at all, only a title. Mapping every title to one taxonomy by hand works for a hundred products and stops being realistic well before ten thousand.
The taxonomy
=HUNCHPICK(A2:A1000, "home and kitchen: cookware, small appliances, kitchen tools and gadgets|furniture: chairs, tables, storage, shelving|bedding and bath: sheets, towels, bath accessories|outdoor and garden: patio furniture, planters, garden tools|electronics and accessories: cables, chargers, small gadgets|clothing and accessories|other")In Excel: =HUNCH.PICK(A2:A1000, "home and kitchen: cookware, small appliances, kitchen tools and gadgets|furniture: chairs, tables, storage, shelving|bedding and bath: sheets, towels, bath accessories|outdoor and garden: patio furniture, planters, garden tools|electronics and accessories: cables, chargers, small gadgets|clothing and accessories|other")
Six categories, each described by what it holds, and other for the titles that do not belong to any of them. A general home goods catalog is shown here; a narrower store needs a narrower list, ten specific categories read better than six broad ones that argue with each other. Full syntax is on the HUNCHPICK reference.
Real outputs
Nine product titles copied straight from a catalog feed, capitalization and all.
| Row | A | B |
|---|---|---|
| 1 | Product title | Category |
| 2 | Ninja Foodi 8-qt 9-in-1 Pressure Cooker and Air Fryer, Stainless Steel | home and kitchen |
| 3 | Set of 4 Rattan Outdoor Dining Chairs with Cushions, Weather Resistant | outdoor and garden |
| 4 | 300 Thread Count Egyptian Cotton Sheet Set, Queen, White | bedding and bath |
| 5 | USB-C to Lightning Cable 6ft Braided, Fast Charging | electronics and accessories |
| 6 | Women's High-Waisted Yoga Leggings with Pockets, Black, M | clothing and accessories |
| 7 | Solar Powered LED Pathway Lights, 8-Pack, Warm White | outdoor and garden |
| 8 | Bamboo Bathroom Storage Cabinet with 2 Doors | furniture |
| 9 | Men's Merino Wool Crew Socks, 3-Pack | clothing and accessories |
| 10 | Replacement Filter for XYZ-3000 Water Pitcher, 2-Pack | home and kitchen |
None of the nine titles land in other, including the replacement water-pitcher filter, which reads as home and kitchen despite being a spare part rather than the appliance itself. The bathroom storage cabinet is the one worth a second look: it lands on furniture, not bedding and bath, because the option list defines furniture by object type, chairs, tables, storage, shelving, rather than by which room the object sits in. That is the option list working as written, though it is worth rereading if your team expects anything with bathroom in the title to land in the bath category instead.
Confidence for review
=HUNCHPICK(A2:A1000, "home and kitchen: cookware, small appliances, kitchen tools and gadgets|furniture: chairs, tables, storage, shelving|bedding and bath: sheets, towels, bath accessories|outdoor and garden: patio furniture, planters, garden tools|electronics and accessories: cables, chargers, small gadgets|clothing and accessories|other", "", "confidence")In Excel: =HUNCH.PICK(A2:A1000, "home and kitchen: cookware, small appliances, kitchen tools and gadgets|furniture: chairs, tables, storage, shelving|bedding and bath: sheets, towels, bath accessories|outdoor and garden: patio furniture, planters, garden tools|electronics and accessories: cables, chargers, small gadgets|clothing and accessories|other", "", "confidence")
Same title, same options, the fourth argument changed from nothing to "confidence". It returns a probability for the option that got picked, not the option itself, run it as a second column next to the category so you keep both.
| Row | A | B | C |
|---|---|---|---|
| 1 | Product title | Category | Confidence |
| 2 | Multi-Tool Camping Gadget with LED Light and Bottle Opener | outdoor and garden | 0.84 |
| 3 | Kids' Table and Chair Set with Storage | furniture | 1.00 |
| 4 | Cotton Throw Blanket, Grey, 50x60 in | bedding and bath | 0.99 |
| 5 | Smart Plug Compatible with Alexa, 4-Pack | electronics and accessories | 0.99 |
| 6 | Ceramic Plant Pot with Drainage Hole, 6 inch | outdoor and garden | 1.00 |
| 7 | Stainless Steel Water Bottle, 32oz, Insulated | home and kitchen | 0.90 |
Every row in this set scores 0.84 or higher, which is not what a hand-picked set of cross-category items was expected to produce. The camping multi-tool, which could plausibly be read as outdoor gear or an electronic gadget, is the least confident of the six at 0.84, and even the kids' table and chair set comes back at a full 1.00 despite the taxonomy having no separate bucket for children's furniture. The lesson is not that these titles were easy to guess. A 0.6 cutoff, picked before looking at real data, would have returned nothing to review from this batch. Sort your own column by confidence first and read where the scores start dropping before you pick a number.
What to do with a low-confidence row
=SORT(FILTER(A2:C1000, C2:C1000<0.6), 3, TRUE)Lowest confidence first. A single low score is worth a glance; several low scores clustered around the same kind of product usually mean the taxonomy needs one more bucket, not that the model guessed badly.
=COUNTIFS(B2:B1000, "outdoor and garden")Once the category column is settled, a plain count per category is the merchandising number, how many SKUs sit in each part of the catalog, without opening a single product page.
Freeze the category column to values once the catalog is stable (Extensions › Hunch › Freeze selection to values), then rerun the formula only on new products added after that.
Limits
- Only the title text is read, not the product image, the price, or an existing category ID already in your feed.
- The option list can hold up to 255 entries but reads clearly under about 30. For a catalog with real subcategories, pick the top-level category first, then run a second HUNCHPICK scoped to each top-level group for the subcategory.
- A bare SKU code with no descriptive words returns a low-confidence guess or lands in other. Add the product title or description column if a feed only has codes today.
- It does not know your existing taxonomy unless you write it into the option list. If a vendor feed already carries a category string, keep it as a separate column and compare the two rather than discarding one.
Copy the template to try this on your own catalog. The expense categorization guide covers the same HUNCHPICK pattern on transaction descriptions instead of product titles, and the general classification guide covers the pattern on any list.
Questions
How big can the option list get?
Can it return my internal category ID instead of a label?
What does a low confidence score mean?
Does it work on a title that is only a SKU code?
What happens if two vendors describe the same kind of product differently?
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
- Categorize support tickets in a spreadsheet Ticket triage
- Code open-ended survey responses in Google Sheets Survey coding
- Classify text into categories with a Google Sheets formula Classification
- Tag customer reviews by topic in Google Sheets Review tagging
- AI formulas for Google Sheets: what returns a number, what returns text AI formulas compared