Add space after comma in string
This tutorial explains how to use a combination of the TRIM and the SUBSTITUTE function to add space after comma in a text string in Excel.
How to add space after comma in a string in Excel?
Supposing you have received a list containing names with no space after the comma as the below screenshot shown, you can apply the following formula to add space after the comma easily.
A1: Represents the cell containing the text string you will add a space after the comma.
How to use this formula?
1. Select a blank cell to output the result. Here I select cell D3.
2. Enter the below formula into it and press the Enter key. And then drag its Fill Handle down to apply the formula to other cells.
Then you can see a space is added after each comma in specific cells as the above screenshot shown.
How this formula works?
- SUBSTITUTE(B3,",",", "): The SUBSTITUTE function replaces a comma "," with ", " (there is a space after the comma) in "Doe,Jane"., and returns the result as "Doe, Jane".
- TRIM("Doe, Jane"): The TRIM function removes all extract spaces from "Doe, Jane" and keeps only single space between words.
Excel TRIM function
The Excel TRIM function removes all extra spaces from text string and only keeps single spaces between words.
Excel SUBSTITUTE function
The Excel SUBSTITUTE function replaces text or characters within a text string with another text or characters.
Add comma after first word in a cell in Excel
To add a comma after the first word only in a cell, the formula in this tutorial can do you a favor.
Separate numbers from units of measurement
This article explains how to use formula to separate numbers from unites of measurement.
Split text and numbers in a cell in Excel
If you want to split text and numbers in a cell into different column cells with formulas, this formula tutorial will do you a favor.
Split Text String At Specific Character In A Cell In Excel
This tutorial explains how to split texts string at a specific character into separate column cells with formulas in Excel.
Add A Specific Character Before Each Word In A Cell
This tutorial provides a formula in detailed steps to help add a specific character before each word in a cell in Excel.
The Best Office Productivity Tools
Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save 80% time for you.
- Designed for 1500 work scenarios, helps you solve 80% Excel problems.
- Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
- Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
- 30-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.
- One second to switch between dozens of open documents!
- Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
- Increases your productivity by 50% when viewing and editing multiple documents.
- Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Firefox, And New Internet Explorer.