To split a string in Google Sheets, use the SPLIT function with a delimiter, like =SPLIT(A1, ","), or use the built-in Data > Split text to columns menu for a no-formula approach. Both are fast, but the right choice depends on whether you need a permanent split or a dynamic formula that updates when the source changes.
What “Splitting a String” Means in Sheets
Splitting a string means breaking one cell’s text into multiple cells based on a delimiter—a character or set of characters that separates the pieces. Common delimiters are commas, spaces, semicolons, or custom markers like | or -. For example, the cell John,Smith,NY can be split into three cells: John, Smith, and NY.
Google Sheets offers two primary methods: the SPLIT function (dynamic) and the Split text to columns menu (static). There are also advanced options for splitting by position or using regular expressions when the data is inconsistent.
Method 1: Using the SPLIT Function (Dynamic)
The SPLIT function is the most flexible way to split strings. Its syntax is:
=SPLIT(text, delimiter, [split_by_each], [remove_empty_text])
- text: the cell reference or string to split.
- delimiter: the character(s) that separate the pieces. Enclose in quotes, e.g.,
",". - split_by_each (optional):
TRUE(default) treats each character in the delimiter as a separate separator;FALSEtreats the whole delimiter as one separator. - remove_empty_text (optional):
TRUE(default) removes empty cells;FALSEkeeps them.
Example: If cell A1 contains apple,banana,cherry, enter =SPLIT(A1, ",") in cell B1. The result spills across B1, C1, and D1 as apple, banana, cherry. If the delimiter is a space, use =SPLIT(A1, " ").
To split by a multi-character delimiter like -- , set split_by_each to FALSE: =SPLIT(A1, " -- ", FALSE).
Because SPLIT is a formula, it recalculates automatically when the source cell changes. However, it spills results into adjacent cells, which will overwrite any existing content—so ensure there’s empty space to the right.
Method 2: Using Data > Split Text to Columns (Static)
If you don’t want a formula and prefer a one-time conversion, use the menu:
- Select the cell or column containing the text.
- Click Data > Split text to columns.
- Choose the separator from the dropdown that appears (comma, semicolon, period, space, or custom).
- Sheets replaces the original cell with the split values, pushing them into adjacent columns.
This method is static—the split results do not update if you later change the original text. It’s ideal for cleaning imported data or when you don’t need ongoing updates. Note that this overwrites the original data, so consider duplicating the column first if you need to keep the original.
Method 3: Splitting with Formulas for Complex Cases
Sometimes you need to split only part of a string or handle irregular data. Combine SPLIT with other functions:
- Split and take the first part:
=INDEX(SPLIT(A1, ","), 1, 1)returns the first piece. - Split by line breaks: Use
=SPLIT(A1, CHAR(10))whereCHAR(10)is the newline character. - Split by multiple delimiters: Use
REGEXREPLACEto normalize delimiters first, then split. For example, to split on commas or semicolons:=SPLIT(REGEXREPLACE(A1, "[,;]", "|"), "|"). - Split by position: Use
LEFT,MID, andRIGHTto extract fixed-width parts, e.g.,=LEFT(A1, 5)for the first 5 characters.
For a dynamic split that also handles empty values, use =SPLIT(A1, ",", FALSE, FALSE) to keep empty cells.
Common Problems and How to Fix Them
Here are frequent issues users encounter and their solutions:
- #VALUE! error: The delimiter isn’t found. Check that the delimiter is spelled correctly and matches the data (e.g., a comma vs. a full-width comma).
- Results spill over existing data: The
SPLITfunction overwrites cells to the right. Clear or move any content in that range before using it. - Trailing spaces: If your data has spaces around delimiters, use
=SPLIT(TRIM(A1), ",")to trim the whole string first, or useARRAYFORMULA(TRIM(SPLIT(A1, ",")))to trim each piece. - Delimiter is a period or regex character: In
SPLIT, the delimiter is treated literally, so no escaping is needed. But if you useREGEXREPLACEorREGEXEXTRACT, escape special characters like.or*with a backslash. - Split by newline: Use
CHAR(10)as the delimiter, not"\n"(which is not interpreted as a newline in Sheets).
SPLIT vs. Other Tools: What to Choose
For most users, the SPLIT function is the best balance of power and simplicity. The menu method is quicker for one-off tasks. If you need to split data in Excel, note that Excel uses Text to Columns (Data tab) or functions like TEXTSPLIT (Excel 365), but SPLIT does not exist in Excel.
For very large datasets, the menu method can be faster because it doesn’t recalculate. But if your data changes frequently, the formula approach saves time in the long run.
Frequently Asked Questions
Can I split a string into rows instead of columns? Yes, use TRANSPOSE(SPLIT(A1, ",")) to place the results vertically.
How do I split a column of many cells at once? Select the entire column, then use Data > Split text to columns. For formulas, you can drag the fill handle, but the results will spill into adjacent columns for each row.
What if my delimiter is a space but there are multiple spaces? Use =SPLIT(REGEXREPLACE(A1, "\s+", " "), " ") to collapse multiple spaces into one before splitting.
Why does SPLIT return an error when the cell is empty? SPLIT returns a single empty cell if the text is empty, but if you use it in an array formula, it may produce a #VALUE! error. Wrap it in IFERROR to handle blanks: =IFERROR(SPLIT(A1, ",")).
Can I split by a delimiter that is a question mark or asterisk? Yes, SPLIT treats the delimiter literally, so =SPLIT(A1, "?") works. However, if you use REGEXREPLACE or REGEXEXTRACT, escape those characters with a backslash.
Does SPLIT work on Google Sheets mobile app? Yes, the function works in the mobile app, but the menu option may be under a different path. On the app, tap the column header, then choose “Split text to columns” from the context menu.
Related
- Give Me a Random Number 1-5? Here’s Your Answer
- Best Excel Template for Personal Budget: A Full Guide
- BITXOR in Google Sheets: How to Use It
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- DepEd Class Attendance Sheet Template Excel: Free GuideYes, the Department of Education (DepEd) in the Philippines does not prescribe a single mandatory Excel template for…
- Meat Inventory Spreadsheet: Track Stock, Cost, and WasteA meat inventory spreadsheet helps you record what you have, where it is, which lot it came from,…
- How to Change Track Changes Color in WordIn Word for Microsoft 365 on Windows, go to File > Options > Advanced, scroll to Track Changes,…
- Google Sheets Indian Currency Format: Rupee GuideTo show amounts in Indian rupees in Google Sheets, select the cells and choose Format > Number >…
- Google Docs and Google Sheets: Differences and UsesGoogle Docs is Google’s word-processing app for writing and formatting documents; Google Sheets is its spreadsheet app for…
- How to Hide Columns in Excel With a + SignTo hide columns and keep a plus sign you can click to show them again, group the columns:…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.