The TEXTSPLIT function in Excel allows you to divide a string of text into separate cells based on a specific character or phrase called a delimiter. To use it, enter =TEXTSPLIT(text, col_delimiter) into a cell, where "text" is the cell you want to break apart and "col_delimiter" is the character (like a comma or space) that marks where the split should happen. This function is a dynamic array formula, meaning it automatically spills the results into the adjacent cells to the right or down.
What You'll Need
- A subscription to Microsoft 365 or Excel for the Web (TEXTSPLIT is not available in older versions like Excel 2019 or 2021).
- A dataset containing text strings that follow a consistent pattern (e.g., "City, State" or "First Name Last Name").
- An empty area of cells to the right and below your formula to allow the data to "spill" without obstruction.
Step-by-Step
- Identify your delimiter: Look at the data you want to split. Determine exactly what character is separating the pieces of information. Common delimiters include commas (,), semicolons (;), spaces ( ), tabs, or pipes (|). If the delimiter is a word or a phrase, note it exactly as it appears, including capitalization.
- Select the destination cell: Click on the empty cell where you want the first piece of the split data to appear. Ensure there are enough empty columns to the right of this cell to accommodate the number of segments the text will be broken into.
- Enter the basic formula: Type
=TEXTSPLIT(into the cell. - Select the target text: Click on the cell containing the text you wish to split (e.g., cell A2) or type the cell reference manually. Follow this with a comma to move to the next argument.
- Define the column delimiter: Type the delimiter inside double quotation marks. For example, if your data is separated by a comma, type
", ". If it is separated by a space, type" ". Close the parenthesis and press Enter. The full formula would look like=TEXTSPLIT(A2, ", "). - Handle multiple delimiters (Optional): If your data uses different characters to separate values (e.g., some entries use commas and others use semicolons), you can use an array constant for the delimiter. Enter them inside curly brackets within the quotation marks, like this:
=TEXTSPLIT(A2, {",", ";"}). This tells Excel to split the text whenever it encounters either a comma or a semicolon. - Split into rows instead of columns (Optional): If you prefer the data to spill downward into rows rather than across columns, skip the second argument (column delimiter) by adding an extra comma, and put your delimiter in the third argument (row delimiter). The formula would look like
=TEXTSPLIT(A2, , ", "). - Manage empty cells (Optional): If some of your data has consecutive delimiters (e.g., "Apple,,Orange"), Excel will create an empty cell in the results. To ignore these, add a fourth argument. Use
=TEXTSPLIT(A2, ",", , TRUE). Setting theignore_emptyargument to TRUE tells Excel to skip over any empty segments. - Apply to the rest of the list: Once the first formula works, click the fill handle (the small square at the bottom-right of the cell) and drag it down to apply the split to the remaining rows in your dataset.
Common Mistakes
One of the most frequent errors is forgetting to wrap the delimiter in double quotation marks. Because the delimiter is a text string, Excel requires quotes; otherwise, it will treat the character as a named range or a function, resulting in a #NAME? error.
Another common mistake is ignoring the "Spill Range." Because TEXTSPLIT is a dynamic array function, it needs empty space to output the results. If there is already data in the cells to the right of your formula, Excel cannot "spill" the results and will return a #SPILL! error. You must clear the obstructing data or move the formula to a new location.
Users often confuse the column delimiter and the row delimiter. If you put your delimiter in the third position of the formula instead of the second, your data will flow vertically down the page instead of horizontally across the row. Always remember the order: (text, col_delimiter, [row_delimiter], [ignore_empty], [match_mode], [pad_with]).
Finally, some users attempt to use TEXTSPLIT on data that is not consistent. If some rows use a comma and others use a dash, but the formula only specifies a comma, the rows with dashes will not be split at all; they will simply remain as a single block of text in the first cell.
Tips
To make your split data permanent, you can convert the formulas into static values. Select the spilled range, copy it (Ctrl+C), then right-click and choose Paste Special > Values. This prevents the data from changing if the original source text is edited and stops the #SPILL! error from occurring if you add data to the surrounding cells later.
Combine TEXTSPLIT with the TRIM function to clean up your data. Often, delimiters are followed by a space (e.g., "City, State"). If you split only by the comma, the second cell will start with a leading space. Using =TRIM(TEXTSPLIT(A2, ",")) ensures that all leading and trailing spaces are removed from every resulting cell.
If you need to split text and then immediately perform an action on it, consider nesting TEXTSPLIT inside other functions. For example, if you only want the first word of a sentence, you can use =INDEX(TEXTSPLIT(A2, " "), 1). The INDEX function tells Excel to only return the first item from the array created by TEXTSPLIT.
For complex datasets where you need to split by a specific number of characters rather than a delimiter, TEXTSPLIT is not the right tool. In those cases, use the LEFT, RIGHT, or MID functions to extract text based on position.
Troubleshooting
If the formula returns a #SPILL! error, look at the cells to the right and below the formula. Even a single space character in a cell can block the spill range. Highlight the area to the right and press the Delete key to ensure it is completely empty.
If you see a #NAME? error, first check your version of Excel. Go to File > Account to verify you are using Microsoft 365. If you are using an older version, TEXTSPLIT does not exist. As an alternative, use the Data > Text to Columns feature found in the top ribbon menu.
If the data is not splitting as expected, check for hidden characters. Sometimes data imported from the web contains "non-breaking spaces" that look like regular spaces but are different characters. To fix this, you can use the SUBSTITUTE function to replace non-breaking spaces with regular spaces before splitting, or copy a sample of the actual delimiter from the cell and paste it directly into your formula quotes.
If you encounter a #VALUE! error, ensure that the cell reference you are pointing to actually contains text. If the cell is empty or contains an error itself, TEXTSPLIT may fail to process the input.
Frequently Asked Questions
Can TEXTSPLIT handle different delimiters at once?
Yes. By using an array constant—wrapping multiple delimiters in curly brackets, such as {",", "|", ";"}—Excel will split the text whenever it encounters any one of those characters.
How do I split text into rows instead of columns?
Leave the second argument (column delimiter) blank by typing two commas in a row, and place your delimiter in the third argument (row delimiter) position.
What is the difference between TEXTSPLIT and Text to Columns?
Text to Columns is a static tool found in the Data menu that requires you to run a wizard manually. TEXTSPLIT is a formula that updates automatically if the source text changes.
Can I split text by a specific word instead of a character?
Yes. Any text string can be a delimiter. For example, =TEXTSPLIT(A2, " and ") will split the cell wherever the word " and " appears.
Does TEXTSPLIT work in Excel 2016 or 2019?
No, TEXTSPLIT is exclusive to Microsoft 365 and Excel for the Web. Users of older versions should use the Text to Columns feature or a combination of LEFT, FIND, and MID functions.
How do I remove empty cells from my split results?
Set the fourth argument of the function (ignore_empty) to TRUE. This prevents Excel from creating a blank cell when two delimiters appear side-by-side.