Return to Excel Formulas List

How to Add Comma in Excel & Google Sheets

Download Example Workbook

Download the example workbook

This tutorial will demonstrate how to add commas in Excel and Google Sheets.

add comma Main Function

Add Single Comma

We can add a single comma in Excel and Google Sheets by surrounding the comma with quotations (to tell Excel the comma is a string of text) and by using the ampersand operator (&) to merge comma together with the cell values.

Add Comma

In this example we’ve merged two cells together, separating the cell values with a comma. We use the ampersand operator (“&”) to join the text strings together.

Add Comma to a List (Excel 2019 and Later)

Commas can also be added to lists in Excel and Google Sheets with the use of the TEXTJOIN Function.

Textjoin

The TEXTJOIN Function simply combines a range of cells together, separated by a delimiter (in our case a comma).

In the example above, within the TEXTJOIN Function we first indicate the comma as the delimiter required, next we choose to ignore blank cells by selecting “TRUE” and then we select the list range that needs to be combined (“B3:B6”).

The TEXTJOIN Function was introduced in Excel 2019.

Replace space by Comma

Commas can also be replace to Space (” “) in Excel and Google Sheets with the use of the SUBSTITUTE Function.

SUBSTITUTE

The SUBSTITUTE Function simply replace the our set Character, In this example we are showing how to replace Space (” “) by commas, But based on the available character we change function accordingly.

Please look below example which we can replace dash (-) by commas.

SUBSTITUTE Dash

Create Running List with Comma

In versions of Excel prior to 2019, you can accomplish the same thing by creating a running list.

Running List

In the example above, we created a running list based on the contents in column B.

What the formula does is, it creates a list that keeps building for each row. Using the ampersand operator, the cell above is joined to the cell on the left (the cell in column B on the same row with the formula cell), this is then separated with a comma.

Cell C3 has the formula “=B3”, cell C4 has the formula “=C3&”,”&B4″ which is the joining of the cell above and the cell on the left. By copying the formula down to the cells below, we built a running list of the content in column B.

Add Commas in Google Sheets

These formulas work exactly the same in Google Sheets as in Excel.

add comma Google Function