Insert a Line Break Between First and Last Names in Excel
Question details
Add a line break between names within each cell across a large list without editing every cell manually.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet contains names such as John Wick that need to appear on two lines in the same cell.
- Observed behavior
- Each name should display on two lines in one cell after the formula is applied to the list.
Check whether the names are separated by a space or formatted as Last Name, First Name. Identify an empty column next to the names for the formula results.
Replace the first space with a line break
Use this formula for names such as John Wick, then fill it down the list.
The formula replaces only the first space, so any remaining parts of the name stay on the second line.
If the first name is in A2, select an empty cell such as B2 and enter =SUBSTITUTE(A2," ",CHAR(10),1).
Select B2 and double-click the fill handle at its bottom-right corner, or drag it down alongside the remaining names.
Select the result cells and choose Home > Wrap Text. If necessary, use Home > Format > AutoFit Row Height to show both lines.
Copy the result cells, select the original name cells, and choose Home > Paste > Values. You can then remove the formula column.

Split comma-separated last and first names
Use this option when names are stored as Last Name, First Name and you want to remove the comma.
Add name line breaks in WPS Spreadsheets
Use a formula in WPS Spreadsheets to replace the first space in each name with a line break, then enable text wrapping for the results.
- 1. Open your spreadsheet: Open WPS Spreadsheets and choose Open to select your Excel file.
- 2. Enter the formula: If the first name is in A2, select an empty cell such as B2 and enter =SUBSTITUTE(A2," ",CHAR(10),1).
- 3. Fill the formula down: Select B2 and drag its fill handle down to apply the formula to the rest of the list.
- 4. Wrap the results: Select the formula cells and choose Home > Wrap Text to display each name on two lines. Adjust row heights if needed.

Frequently Asked Questions
Why does the name still appear on one line?
Select the result cell and choose Home > Wrap Text. If the second line is still hidden, increase the row height or use Home > Format > AutoFit Row Height.
How do I add the line break to every name in a column?
Enter the formula beside the first name, then drag or double-click the formula cell's fill handle to copy it down the list.
Can I replace the original names with the formatted results?
Yes. Copy the formula results, select the original cells, and choose Home > Paste > Values. Keep Wrap Text enabled on those cells.
What happens if a name has a middle name?
The formula replaces only the first space. For example, John Paul Wick becomes John on the first line and Paul Wick on the second.




