Sub topic 10
Split Combined Values with Split Text to Columns
Assume you can select ranges, use the Google Sheets menu bar, and enter simple formulas. This chapter uses a table where one cell contains multiple values, such as Doe, Jane or 555-010-1234; 555-010-5678. Splitting separates those values into adjacent columns so you can sort, filter, validate, or analyze them independently.
When combined values cause problems
A combined value is text that contains multiple fields separated by a character. Common separators include commas, semicolons, pipes, and line breaks.
For example, this table stores a person's last and first name in one cell:
| A |
|---|
| Doe, Jane |
| Smith, Alex |
A lookup for Jane will not match Doe, Jane as a complete cell value. Splitting the column creates separate fields:
| Last name | First name |
|---|---|
| Doe | Jane |
| Smith | Alex |
The separator must be consistent. If some rows use commas and others use semicolons, clean or standardize the values first.
Use Split text to columns
The menu command changes the selected cells. Make a copy of the source column or duplicate the sheet before using it.
- Select the cells containing the combined values, such as
A2:A. - Select Data > Split text to columns.
- Open the separator menu that appears below the selected range.
- Choose the separator, such as Comma, Semicolon, Period, or Space.
- Choose Custom when your delimiter is another character, such as
|. - Check the preview. Google Sheets writes the parts into the selected column and the columns to its right.
- Confirm that those destination columns are empty or contain data you have already backed up.
If the separator is a comma followed by a space, choose Comma. The split may leave a leading space in the second column. You can remove it with TRIM, for example:
=TRIM(B2)The menu command is useful for a quick, one-time transformation. It is less suitable when the source data will be replaced regularly because the operation must be repeated manually.
Use the SPLIT function
SPLIT is a formula that returns each part of a text value in adjacent cells. Its basic form is:
=SPLIT(A2, ", ", FALSE)For Doe, Jane in A2, the formula returns Doe in one cell and Jane in the next. The third argument, FALSE, tells Sheets to treat ", " as one delimiter. Without it, Sheets may treat the comma and space as separate delimiters.
Enter the formula in an empty cell, such as B2, then fill it down. For a whole column, use:
=ARRAYFORMULA(SPLIT(TRIM(A2:A), ","))This version trims the source values before splitting them. Leave enough empty columns for the result to expand. A formula cannot expand into cells that already contain values.
Use a formula when you need a repeatable result or want to preserve the original combined column. Use the menu command when you need a fast, one-time change and have already made a backup.
Exercise
Cell A2 contains Smith, Alex. Which formula splits it into last name and first name while treating the comma and following space as one delimiter?
Show answer
=SPLIT(A2, ", ", FALSE)