We often receive Excel data with several pieces of information packed into a single cell. The data may have been perfectly suitable for its original purpose, but that does not mean it is ready for how we want to use it.
A list of full names is a simple example. If we need first names and last names in separate columns, typing them out manually is manageable for a few cells. For hundreds or thousands of rows, we need a better option.
Thankfully, Excel gives us several ways to split the contents of a cell into multiple cells:
- Text to Columns for a quick, straightforward split.
- Flash Fill for extracting text based on examples.
- Power Query for a repeatable process we can refresh.
- Formulas for results that update automatically.
We will use the same clean dataset for each method: ten full names in cells A2:A11, with a header in A1. Each name contains a first name and a last name separated by one space. You can get the example workbook to follow along.
The important point is that real data is not always this consistent. The best method depends on both the structure of your text and how you need the results to update.
What You'll Learn
- Text to Columns quickly separates consistently structured text using a chosen delimiter.
- Flash Fill extracts text from examples, but its inferred patterns need checking.
- Power Query saves splitting steps so changed source data can be processed again with a refresh.
- Formulas update split results automatically, though more complicated text requires more complicated rules.
Table of Contents
- 1. Split Cells with Text to Columns
- 2. Split Cells with Flash Fill
- 3. Split Cells with Power Query
- 4. Split Cells with Excel Formulas
- Which Method Should You Use?
1. Split Cells with Text to Columns
Text to Columns is one of those Excel features that hides in plain sight. It has its own button on the ribbon, but unless you know what it does, it is easy to overlook.
For a simple text transformation, it is a great place to start.
Use a space as the delimiter
A delimiter is the character separating one piece of information from another. In our list of names, that character is a space.
- Select the full names in A2:A11.
- Go to Data > Text to Columns.
- In the first step of the wizard, select Delimited, then click Next.
- Select Space as the delimiter. Clear any other delimiter selections that do not apply.
- Check the data preview, then click Next.
- Leave the column data format set to General for this example.
- Set the destination to $B$2, then click Finish.
That is all it takes. The first names appear in column B and the last names in column C, while the original full names remain in column A.
Space is not the only option. The wizard also supports tabs, semicolons, and commas. If your data uses another delimiter, select Other and enter the character in the box.
When Text to Columns works best
Text to Columns is quick, but it is not dynamic. If the original names change, the split results do not update. We need to run the wizard again.
It also works best when the source data follows a consistent structure. Additional spaces or extra parts within some names can affect the split, so check the preview rather than assuming every row will behave in the same way.
For a one-off task with clean data and a clear delimiter, this is a nice, simple option.
2. Split Cells with Flash Fill
Flash Fill, introduced in Excel 2013, takes a different approach. Rather than asking us to specify a delimiter, Excel looks for a pattern in the examples we enter.
It can run automatically in the background and suggest results, or we can trigger it manually. We will use both approaches.
Extract first names automatically
For this setup, keep the source names to the left of the output columns.
- Select B2 and type the first name from A2.
- Press Enter.
- In B3, start typing the first name from A3.
- When Excel displays suggestions for the remaining rows, press Enter to accept them.
Excel uses our examples to infer that we want the first part of each full name. Once it recognizes that pattern, it fills the remaining first names for us.
Extract last names manually
We do not have to wait for an automatic suggestion. We can give Excel an example and ask it to find the pattern.
- In column C, type the correct last name alongside one of the full names. In our example, we use Lewis on the matching row.
- Select the output range C2:C11, including the example.
- Go to Home > Fill > Flash Fill.
Excel fills the last names into the selected cells. We now have first names and last names in separate columns without writing a formula.
Check that Excel has found the right pattern
Flash Fill can extract parts of text strings rather than relying only on a delimiter or fixed character positions. That makes it useful for more varied text patterns than a straightforward Text to Columns split.
But it is not a mind reader. There must be a logical relationship between the source data and the examples. Even when Excel finds a pattern, it may not be the one we intended, so check the completed results.
For example, typing cheese in one output cell and burger in another gives Excel nothing useful to infer from our list of names. Running Flash Fill then produces an error explaining that it could not identify a pattern in the neighboring data.
Like Text to Columns, Flash Fill produces static results. If the source names change, we need to run the process again.
3. Split Cells with Power Query
Power Query is a good option when splitting text is part of a task we expect to repeat. Instead of rebuilding the transformation each time, we create it once and refresh the results when the source data changes.
Power Query is built into Excel for Windows from Excel 2016 onward. It was also available as an add-in for Excel 2010 and 2013.
Load the names into Power Query
- Select any cell within the source list.
- Go to Data > From Table/Range.
- If Excel asks you to create a table, check that the range is $A$1:$A$11.
- Confirm that My table has headers is selected, then click OK.
The Power Query Editor opens with our list of names.
Split the column by delimiter
- Select the column containing the full names.
- Go to Home > Split Column > By Delimiter.
- Select Space as the delimiter.
- Choose where to split, then click OK.
Power Query lets us split at the leftmost delimiter, the rightmost delimiter, or each occurrence of the delimiter.
Our sample names each contain just one space, so all three options give the same result. With more complicated text, that choice matters.
Once the names are separated, double-click the column headers and rename them First Name and Last Name.
The Split Column menu contains other options too, making Power Query useful beyond this simple example. Microsoft’s guide to splitting columns by delimiter provides further detail on these settings.
Load the results back into Excel
- Go to Home > Close & Load > Close & Load To.
- In the Import Data window, select Table.
- Choose Existing worksheet and set the destination to $C$1.
- Click OK.
The split names are loaded into a separate Excel table, beginning in C1.
Refresh when the source changes
Suppose we change Doris Green to Doris Brown in the source table. The query output does not immediately change, but we do not need to repeat the split steps.
Go to Data > Refresh All. Power Query reruns the transformation, and the output now shows Doris Brown.
The same principle applies when more records are added to the source table: refresh the query to include them.
There are two important points to remember:
- Power Query is refreshable, not instantly dynamic. Source changes appear in the output after a refresh.
- This From Table/Range workflow converts the source range into an Excel table. That happens even if the source was originally an ordinary range.
If splitting names is one step in a wider data-cleaning task, Power Query is a very useful option to have available.
4. Split Cells with Excel Formulas
Formulas give us control over the rules used to split text. They are powerful and flexible, but the complexity of the solution depends on the complexity of the data and our formula skills.
Useful text functions include LEFT, RIGHT, MID, LEN, SEARCH, FIND, and SUBSTITUTE. For our clean list of names, we need only four: LEFT, RIGHT, LEN, and SEARCH.
Find the space with SEARCH
First, we need to locate the character separating the first name from the last name. Enter this in B2:
=SEARCH(" ",A2)
SEARCH returns the position where the specified text is first found. Here, we are searching for a space within A2.
For the first name in our sample, the result is 8. That means the space is the eighth character.
Extract the first name with LEFT
LEFT returns a specified number of characters from the beginning of a text string. We can use the position returned by SEARCH to determine how many characters to extract.
There is one small detail to take care of: extracting eight characters would include the space after the first name. We therefore subtract one from the SEARCH result.
Enter the completed formula in B2:
=LEFT(A2,SEARCH(" ",A2)-1)
The calculation works like this:
SEARCH(" ",A2)locates the space at position 8.- Subtracting 1 gives us 7 characters.
LEFTextracts those seven characters from the start of A2, without the trailing space.
Select B2 and double-click the fill handle at the bottom-right corner of the cell to copy the formula down the list.
Extract the last name with LEN and RIGHT
For the last name, we need to calculate how many characters remain after the space.
Start with the total length of the full name:
=LEN(A2)
In our first sample row, LEN returns 13. The space is at position 8, so subtracting 8 from 13 leaves 5 characters for the last name.
We can calculate that length with:
=LEN(A2)-SEARCH(" ",A2)
Now wrap RIGHT around the calculation to extract that many characters from the end of A2. Enter this completed formula in C2:
=RIGHT(A2,LEN(A2)-SEARCH(" ",A2))
Select C2 and double-click the fill handle to copy it down. Both parts of the full name are now in separate columns.
Why choose formulas?
Formulas are the only one of these four methods that update automatically when the source value changes.
Change Doris Green to Doris Brown in column A, and the formula results update immediately. There is no wizard to rerun and no query to refresh.
The trade-off is complexity. These formulas are straightforward because every name follows the same structure. They split at the first space, so additional spaces or extra name components require different rules. As the text becomes more complicated, the formulas can become more complicated too.
Which Method Should You Use?
All four methods can separate the same clean list of names. The difference is how they identify the split and what happens afterward.
- Choose Text to Columns for a quick, one-off split when the data has a consistent delimiter.
- Choose Flash Fill when you can demonstrate the required output with examples and Excel can identify a logical pattern.
- Choose Power Query when you want to save the transformation steps and rerun them with a refresh.
- Choose formulas when the output needs to update automatically as source values change.
The best option is not always the most sophisticated one. Start with the structure of your data, decide how the results need to update, and choose the simplest method that meets those needs.


