If you want to add a comma before or after a value from a cell, you can write different formulas in Excel. For this, you need to use the concatenation methods or function that allows you to combine two or more values.
In this tutorial, we will look at these formulas in detail.
Using Ampersand to Add a Comma Between Tow Values
In the below example, you have two cells, A1 and B1, with text values. You have to combine these values from these cells and add a comma between them.
Use the below formula for this:
=A1&", "&B1
In this formula, you have values from the cells A1 and B1. And with the help of double quotation marks, there’s a comma and a space between both values.
Or you can do it by using the CONCATENATE function as well.
=CONCATENATE(A1,", ",B1)
And if you already have a comma in a cell, you can use the CONCAT function for that.
Note: You can use this method in any version of Excel.
Use TEXTJOIN to Add Commas Between Multiple Values
If you want to add commas between multiple values from a range of cells, TEXTJOIN is the best function.
=TEXTJOIN(", ",TRUE,A1:A5)
It’s easy to add a comma or any other delimiter with TEXTJOIN. As you can see:
- We have specified a comma and space in the function’s first argument.
- And then TRUE to ignore empty cells.
- In the end, we referred to the range from where we wanted to get.
When you hit enter, it gives you all the values with a comma and a space between every word.