Data cleaning functions — extract, classify, tag, format
A family of functions in GPT for Sheets for turning messy text into structured columns. All of them take a cell as input and are built to be dragged down thousands of rows.
The functions
| Function | What it does |
|---|---|
=GPT_EXTRACT(text, to_extract) |
Pull entities out of text: emails, names, prices, SKUs. |
=GPT_CLASSIFY(value, categories) |
Assign one category from your list. |
=GPT_TAG(value, tags) |
Apply multiple tags from your list. |
=GPT_FORMAT(input, target_format, [source_format]) |
Normalize dates, phones, addresses, casing. |
=GPT_SPLIT(text, split_by) / =GPT_HSPLIT() |
Split text into rows / columns by meaning. |
=GPT_APPLY(text, [task]) |
Apply an edit like “fix grammar and spelling”. |
=GPT_SUMMARIZE(text, [format]) |
Summarize into a given shape (“three sentences”). |
Examples
Extract the email from a messy signature in A2:
=GPT_EXTRACT(A2, "email address")
Classify leads by industry with your own taxonomy in $F$1:
=GPT_CLASSIFY(A2, $F$1)
Normalize phone numbers:
=GPT_FORMAT(A2, "+1 (XXX) XXX-XXXX")
Try it
Copy the template or install GPT for Sheets. Recipe: data cleaning template.