TEXTSPLIT breaks text into pieces at a delimiter, such as a comma, a semicolon or a space, and spills the pieces across cells. Data that looks comma-separated may actually use semicolons, or use two spaces where the AI assumed one, and then the split either does nothing or leaves empty pieces behind. Check the delimiter in the raw text before trusting the split.
What you need
- The AI-written TEXTSPLIT formula
- The raw text it splits, with the separator visible
- The pieces the reader expects to get
Step 1: Look at the raw text for the real delimiter
Select a source cell and read the text in the formula bar, where spaces and punctuation are visible. Write down the exact character between the pieces, including whether it is a comma, a semicolon, or more than one space.
Step 2: Compare the delimiter with the formula
Read the delimiter argument in the TEXTSPLIT formula and check it against the character you found. If the data uses a semicolon and the formula splits on a comma, the text comes back unsplit.
Step 3: Fix the delimiter and count the pieces
Rewrite the formula with the correct delimiter and count the pieces it returns. The count should match the number of values in the raw text, with no empty piece left over from a doubled delimiter.
Worked example: synthetic city list in one cell
The table below is a synthetic example. It shows the expected result of checking an AI-written TEXTSPLIT formula; no formula was run.
| Check | Value | Result |
|---|---|---|
| Raw text | Paris; Lyon; Nice | Semicolon separated |
| Delimiter as written | Comma | Formula splits on , |
| Pieces returned | 1 | Text comes back whole |
| Corrected delimiter | Semicolon | Three pieces returned |
Expected result (UNTESTED). the TEXTSPLIT formula splits on a comma and returns the whole text as one piece, because the data uses semicolons; splitting on a semicolon returns three pieces, Paris, Lyon and Nice. This check was not run live; the table shows the expected result for the synthetic example.
Limits
- TEXTSPLIT needs Microsoft 365 or Excel 2021 or later; older versions show #NAME?.
- A doubled delimiter, such as two spaces, leaves an empty piece between them unless the formula ignores empty values.
- TEXTSPLIT spills across cells, so a blocked cell in the spill range stops it with #SPILL!.
- A delimiter that also appears inside a value, such as a comma in “Paris, France”, splits that value in two.
