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.
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.
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:
VLOOKUP
, XLOOKUP
) fail because keys are merged.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.
=SPLIT(text, delimiter, [split_by_each], [remove_empty])
delimiter
as a separate break; FALSE treats the entire string literally."Doe, John, 1984-10-05" ➜ A2
=SPLIT(A2, ", ")
This outputs three columns: Doe
, John
, 1984-10-05
.
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.
If a CSV has consecutive commas indicating NULLs, preserve them with remove_empty=FALSE
:
=SPLIT(A2, ",", TRUE, FALSE)
SPLIT
is a dynamic-array formula: it spills results horizontally. Ensure no data blocks its path or you’ll see #SPILL!
.
SPLIT
. When the source cell changes, outputs recalculate automatically.SPLIT
integrates with ARRAYFORMULA
, QUERY
, and REGEXREPLACE
.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):
=SPLIT(A2, "|", FALSE)
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.
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
.
Issue: Data exists in cells the split wants to occupy.
Fix: Delete/relocate blocking data or insert blank columns before running SPLIT
.
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.
Issue: Consecutive delimiters disappear, collapsing columns.
Fix: Use remove_empty=FALSE
to preserve empty placeholders so column order stays intact.
TRIM
, CLEAN
, or REGEXREPLACE
with SPLIT
for messy sources.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.
SPLIT
is dynamic, formula-based, and great for pipelines.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.
Use a single space delimiter with remove_empty=FALSE
. Consecutive spaces will create empty columns you can later trim.
Yes. Wrap SPLIT
with TRANSPOSE
: =TRANSPOSE(SPLIT(A2, ","))
turns columns into rows.
Use CHAR(10)
as the delimiter: =SPLIT(A2, CHAR(10))
. Ensure the cell actually contains line-feed characters, not visual wrap only.
Yes. For 50k+ rows, many dynamic formulas can lag. Preprocess in SQL—using a modern editor like Galaxy—then import clean data to Sheets.