Split Sentence into Words Excel Formula
In this article
To split a sentence into words in Excel, use the TEXTSPLIT function (available in Excel 365 and Excel 2021) with the formula =TEXTSPLIT(A1," "), which returns each word in its own cell. For older Excel versions, combine TRIM, MID, SUBSTITUTE, and REPT in an array formula, or use the built-in Text to Columns wizard for a one-time split.
in t | Sentence | - | The quick brown fox jumps | 0 out words | Words | - | TEXTSPLIT(t, " ") | 0
Formula
The modern Excel formula is:
=TEXTSPLIT(A1, " ")
- A1 – the cell containing the sentence (text).
- " " – the delimiter (a space) that separates words.
The function returns a horizontal array of words, spilling into adjacent cells automatically. If you want words in a vertical column instead, add a second argument: =TEXTSPLIT(A1, " ", , TRUE) – the TRUE makes it row-wise (vertical).
For older Excel (2019 and earlier), a classic formula to extract the nth word is:
=TRIM(MID(SUBSTITUTE(A1," ",REPT(" ",LEN(A1))), (n-1)*LEN(A1)+1, LEN(A1)))
where n is the word position you want (1 for first, 2 for second, etc.). This works by replacing each space with a long run of spaces, then taking a slice of the text and trimming it.
Worked Example
Using the default sentence "The quick brown fox jumps" in cell A1:
- In cell B1, enter
=TEXTSPLIT(A1, " "). - Excel spills the result across B1:F1: The, quick, brown, fox, jumps.
- If you instead use
=TEXTSPLIT(A1, " ", , TRUE), the words appear in B1:B5 vertically.
For the older formula, to get the 3rd word ("brown") with n=3:
=TRIM(MID(SUBSTITUTE(A1," ",REPT(" ",LEN(A1))), (3-1)*LEN(A1)+1, LEN(A1)))
This returns brown exactly.
When to Use Which Method
- TEXTSPLIT – best for Excel 365 and Excel 2021 users; simple, dynamic, and spills results automatically.
- Text to Columns – good for a one-time split without formulas; found under Data > Text to Columns, choose Delimited, then Space.
- Classic formula – works in any Excel version, but requires dragging the formula across columns and is less intuitive.
- Power Query – ideal for splitting many rows at once; use Split Column > By Delimiter.
Common Mistakes and Pitfalls
- Multiple spaces: Sentences with double spaces will produce empty cells. Wrap the sentence in
TRIMfirst:=TEXTSPLIT(TRIM(A1)," "). - Punctuation: Words like "hello," will include the comma. To remove punctuation, use
=TEXTSPLIT(SUBSTITUTE(SUBSTITUTE(A1,",",""),".","")," "). - Spill range overlap: If cells below or to the right already contain data, TEXTSPLIT will return a #SPILL! error. Clear the obstructing cells.
- Wrong delimiter: If your sentence uses tabs or other characters, specify the correct delimiter in the formula.
How to Read the Result
The output is a dynamic array. Each word occupies its own cell, preserving the original order. You can then use functions like COUNTA to count words, or reference individual cells (e.g., =B1) to use specific words in other formulas. If you need a static copy, copy the spilled range and paste as values.
Limitations and Alternatives
TEXTSPLIT is not available in Excel 2016 or earlier. For those versions, the classic formula or Text to Columns are your only native options. Also, TEXTSPLIT splits by a single delimiter; if you need to split by multiple different characters (like spaces and commas), you can nest SUBSTITUTE to replace them with a common delimiter first. For very large datasets, Power Query offers better performance and more control.
Frequently Asked Questions
How do I split a sentence into words in Excel 2019?
Use the classic formula with TRIM, MID, SUBSTITUTE, and REPT. Enter it in a cell, drag across to fill as many cells as the maximum number of words you expect, and adjust the n reference for each column.
Can I split by a comma instead of a space?
Yes, change the delimiter in the formula: =TEXTSPLIT(A1,",") for commas, or use ";" for semicolons. For Text to Columns, choose the appropriate delimiter in the wizard.
Why does TEXTSPLIT return #VALUE! or #SPILL!?
#VALUE! usually means the delimiter is not found or the argument is invalid. #SPILL! means the result would overwrite existing cells. Clear the blocking cells or move the formula to an empty area.
How do I split a sentence into words vertically?
Use =TEXTSPLIT(A1," ",,TRUE) – the third argument (ignore_empty) is optional, but the fourth (row_delimiter) set to TRUE makes it vertical. Alternatively, use =TRANSPOSE(TEXTSPLIT(A1," ")).
Can I split a sentence into words without using a formula?
Yes, use the Text to Columns wizard: select the cell(s), go to Data > Text to Columns, choose Delimited, select Space as the delimiter, and finish. This overwrites the original data unless you choose a different destination.
How do I count the number of words in a sentence?
Use =COUNTA(TEXTSPLIT(TRIM(A1)," ")) – this counts the non-empty cells in the spilled array. For older Excel, use =LEN(TRIM(A1))-LEN(SUBSTITUTE(TRIM(A1)," ",""))+1.