Skip to main content

Add space after comma in string

Author: Siluvia Last Modified: 2020-02-24

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.

Generic formula

=TRIM(SUBSTITUTE(A1,",",", "))


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.

=TRIM(SUBSTITUTE(B3,",",", "))

Then you can see a space is added after each comma in specific cells as the above screenshot shown.

How this formula works?

=TRIM(SUBSTITUTE(B3,",",", "))

  • 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.

Related functions

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.

Related formulas

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

Kutools for Excel - Helps You To Stand Out From Crowd

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates  |  Delete Blank Rows  |  Combine Columns or Cells without Losing Data  |  Round without Formula ...
Super VLookup: Multiple Criteria  |  Multiple Value  |  Across Multi-Sheets  |  Fuzzy Lookup...
Adv. Drop-down List: Easy Drop Down List  |  Dependent Drop Down List  |  Multi-select Drop Down List...
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  Compare Columns to Select Same & Different Cells ...
Featured Features: Grid Focus  |  Design View  |  Big Formula Bar  |  Workbook & Sheet Manager | Resource Library (Auto Text)  |  Date Picker  |  Combine Worksheets  |  Encrypt/Decrypt Cells  |  Send Emails by List  |  Super Filter  |  Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters ...)  |  50+ Chart Types (Gantt Chart ...)  |  40+ Practical Formulas (Calculate age based on birthday ...)  |  19 Insertion Tools (Insert QR Code, Insert Picture from Path ...)  |  12 Conversion Tools (Numbers to Words, Currency Conversion ...)  |  7 Merge & Split Tools (Advanced Combine Rows, Split Excel Cells ...)  |  ... and more

Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...


Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • 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, Edge and Firefox.
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
Rate this post:
0   Characters
Suggested Locations