Quickly Split Text by Delimiter in Google Sheets

Galaxy Glossary

What’s the quickest way to split text by delimiter in Google Sheets?

Use Google Sheets’ SPLIT function or the Data ➜ Split text to columns tool to divide one cell’s content into multiple columns based on a chosen delimiter—instantly parsing CSVs, names, or any delimited string.

Sign up for the latest in SQL knowledge from the Galaxy Team!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Description

Overview

When you import data into Google Sheets—whether copied from a database query, a CSV file, or a bulk export—you often receive long strings stuffed into a single column. Separating those strings into usable columns is essential for analysis, look-ups, and visualization. Google Sheets offers two primary ways to accomplish this: the SPLIT function and the built-in Split text to columns UI command. Knowing when and how to use each approach will save you hours of manual cleaning and reduce errors.

Why Quick Splitting Matters

Data rarely arrives in the perfect shape. Product logs, marketing lists, and even SQL exports frequently combine multiple data points—such as first and last names, email addresses, or pipe-delimited IDs—into one cell. If you can’t split those fields fast:

  • Your lookups (VLOOKUP, XLOOKUP) fail because keys are merged.
  • Pivot tables mis-aggregate because dimensions are stuck together.
  • You waste time copying, pasting, and manually trimming substrings.

Mastering the SPLIT function and its UI cousin streamlines ETL-style tasks right in Sheets—often eliminating the need to fire up scripting or external SQL tools.

Method 1 — The SPLIT Function

Syntax

=SPLIT(text, delimiter, [split_by_each], [remove_empty])

  • text: The cell or string to split.
  • delimiter: The character(s) that mark breaks.
  • split_by_each (optional): TRUE (default) treats each character in delimiter as a separate break; FALSE treats the entire string literally.
  • remove_empty (optional): TRUE (default) discards empty results; FALSE keeps them.

Basic Example

"Doe, John, 1984-10-05" ➜ A2
=SPLIT(A2, ", ")

This outputs three columns: Doe, John, 1984-10-05.

Advanced: Multiple Delimiters

Sometimes data mixes delimiters (, and |). Pass an array as the delimiter:

=SPLIT(A2, ",|", TRUE)

Because split_by_each is TRUE by default, each character (, or |) is treated separately.

Advanced: Keep Empty Values

If a CSV has consecutive commas indicating NULLs, preserve them with remove_empty=FALSE:

=SPLIT(A2, ",", TRUE, FALSE)

Dynamic Arrays & Spill

SPLIT is a dynamic-array formula: it spills results horizontally. Ensure no data blocks its path or you’ll see #SPILL!.

Method 2 — Split Text to Columns (UI)

  1. Select the column you wish to split.
  2. Navigate: Data ➜ Split text to columns.
  3. Pick a delimiter: Comma, Semicolon, Period, Space, Custom.
  4. Sheets instantly spreads values into new columns, overwriting cells to the right if non-empty.

Best Use-Cases

  • One-off clean-ups: Quick manual splits after importing a CSV.
  • Bulk transformations: Splitting thousands of rows without writing formulas.
  • Static datasets: When data won’t refresh; the split is a destructive edit, not dynamic.

Choosing the Right Method

  • Need dynamic updates? Use SPLIT. When the source cell changes, outputs recalculate automatically.
  • Data is static & huge? Use the UI. Formulas on tens of thousands of rows can slow Sheets.
  • Formula-based pipelines? SPLIT integrates with ARRAYFORMULA, QUERY, and REGEXREPLACE.

Practical Workflow Example

Imagine you exported order data from an ecommerce platform, and column A contains a pipe-delimited line-item list:

1123|T-Shirt|Blue|M|29.99

You want each attribute in its own column (ID, Product, Color, Size, Price):

  1. In B2, enter:
    =SPLIT(A2, "|", FALSE)
  2. Copy or double-click the fill handle to apply down the sheet.
  3. Optionally, wrap in ARRAYFORMULA to avoid dragging:
    =ARRAYFORMULA(IF(A2:A="", "", SPLIT(A2:A, "|", FALSE)))

You now have clean, analysis-ready columns for pivot tables or further processing.

Integration with Google Sheets QUERY

The QUERY function can reference the split output as if they were native columns. No extra steps are required because SPLIT spills into adjacent columns:

=QUERY({SPLIT(A2:A, "|", FALSE)},
"select Col3, sum(Col5)
where Col4 = 'M'
group by Col3")

Here, the inline array literal ({ ... }) feeds the split results directly into QUERY.

Common Mistakes & How to Fix Them

1. Ignoring #SPILL! Errors

Issue: Data exists in cells the split wants to occupy.
Fix: Delete/relocate blocking data or insert blank columns before running SPLIT.

2. Mis-specifying Multi-Character Delimiters

Issue: Passing ", |" (comma-space-pipe) expecting a combined delimiter, but default TRUE treats each character separately.
Fix: Set split_by_each=FALSE to treat the entire string literally.

3. Losing Null Values

Issue: Consecutive delimiters disappear, collapsing columns.
Fix: Use remove_empty=FALSE to preserve empty placeholders so column order stays intact.

Best Practices

  • Back up data before using the destructive UI split.
  • Keep formulas near raw data—use hidden columns if necessary—to maintain audit trails.
  • Chain functions: combine TRIM, CLEAN, or REGEXREPLACE with SPLIT for messy sources.
  • Benchmark performance: For 50k+ rows, ArrayFormula SPLIT can lag; consider exporting to BigQuery or using a SQL editor such as Galaxy.

When a SQL Editor (Like Galaxy) Might Be Faster

If your data lives in a relational database, you could handle splitting at the SQL layer with functions like STRING_SPLIT (SQL Server) or REGEXP_SPLIT_TO_ARRAY (Postgres) before exporting. Tools such as Galaxy provide a modern SQL editor and AI copilot that can auto-generate these queries, then you simply copy clean CSV output into Sheets—avoiding in-sheet processing overhead.

Key Takeaways

  • SPLIT is dynamic, formula-based, and great for pipelines.
  • The UI Split text to columns is ideal for large, static transforms.
  • Mind spill ranges, delimiters, and empty tokens to avoid data loss.
  • For massive datasets, consider preprocessing in SQL via a tool like Galaxy, then load tidy data into Sheets.

Why Quickly Split Text by Delimiter in Google Sheets is important

Knowing how to split delimited strings instantly turns raw, unusable data into structured columns—unlocking look-ups, pivot tables, and reliable analytics without external tooling.

Quickly Split Text by Delimiter in Google Sheets Example Usage



Common Mistakes

Frequently Asked Questions (FAQs)

How do I split on a space without breaking words with multiple spaces?

Use a single space delimiter with remove_empty=FALSE. Consecutive spaces will create empty columns you can later trim.

Can I split a string vertically instead of horizontally?

Yes. Wrap SPLIT with TRANSPOSE: =TRANSPOSE(SPLIT(A2, ",")) turns columns into rows.

What if my delimiter is a line break?

Use CHAR(10) as the delimiter: =SPLIT(A2, CHAR(10)). Ensure the cell actually contains line-feed characters, not visual wrap only.

Does splitting large datasets slow Google Sheets?

Yes. For 50k+ rows, many dynamic formulas can lag. Preprocess in SQL—using a modern editor like Galaxy—then import clean data to Sheets.

Want to learn about other SQL terms?