Sub topic 11
Split Combined Values with a Formula: the SPLIT Function
This chapter assumes you can select ranges, enter formulas, and understand that a cell such as A2 refers to a cell in column A and row 2. You will use SPLIT when one cell contains several values separated by a known character, such as a comma.
Why split a cell?
Imported data often puts multiple values in one cell:
| A |
|---|
| Doe, Jane |
| Smith, Alex |
| Lee, Morgan |
This format is difficult to sort by last name, use in lookups, or analyze by first name. Splitting the text places each part in its own column.
A delimiter is the character or text that separates values. In Doe, Jane, the delimiter is the comma followed by a space: , .
Use SPLIT with a delimiter
Enter this formula in an empty cell:
=SPLIT(A2, ", ", FALSE)The formula reads the text in A2, looks for the delimiter , , and returns the parts in adjacent cells.
| Original value | Result column 1 | Result column 2 |
|---|---|---|
| Doe, Jane | Doe | Jane |
The third argument, FALSE, sets split_by_each to false. This matters because the delimiter is treated as the complete text , rather than as two separate delimiter characters.
If you use only a comma as the delimiter, the result may include a leading space:
=SPLIT(A2, ",")For Doe, Jane, this can return Doe and Jane. You can remove that space with TRIM:
=TRIM(SPLIT(A2, ","))However, using the complete delimiter ", " is usually clearer when the source consistently uses a comma followed by one space.
Split a whole column
If every row uses the same delimiter, you can apply the operation to a range:
=ARRAYFORMULA(SPLIT(TRIM(A2:A), ","))This formula trims the values in column A and splits them at commas. Use an empty area for the result, such as columns B and C. If the source contains spaces after commas, apply TRIM to the resulting columns as needed.
A formula-based split keeps column A unchanged. That makes it useful when you want to preserve the imported values while creating cleaned columns for analysis.
Common errors
- The output overwrites existing data: Move the formula to an empty area or clear the cells where the results need to expand.
- Parts split unexpectedly: Check whether the delimiter occurs inside a value. For example, an address may contain several commas.
- Extra spaces remain: Use
TRIMafter splitting. - Rows have different formats: Inspect the source first. A formula cannot reliably infer whether a comma is a separator or part of the data.
- The formula returns too many columns: Check for additional delimiters in the original cell.
Use the menu command Data cleanup > Split text to columns for a quick, one-time change. Use SPLIT when you want a repeatable result that updates as the original data changes.
Exercise
Cell A2 contains Doe, Jane, and cell B2 already contains a value. Where should you place =SPLIT(A2, ", ", FALSE)?
Show answer
Place it in an empty cell with enough empty cells to its right, such as D2. The formula needs two adjacent cells for Doe and Jane.