Adding Commas to Cell Text
Adding Commas to Cell Text. To add a comma before or after a value in a cell, you can use different formulas in Excel. These formulas involve concatenation methods or functions that allow you to combine multiple values. Let’s explore these formulas in detail.
Adding Commas to Cell Text
Using Ampersand (&) to Add a Comma Between Two Values:
In the example below, we have two cells, A1 and B1, containing text values. We want to combine these values and add a comma between them.
Formula 1: =A1&”, “&B1 In this formula, the values from cells A1 and B1 are combined using the ampersand (&) operator. The double quotation marks represent the comma and space between the values.
Alternatively, you can achieve the same result using the CONCATENATE function.
Formula 2: =CONCATENATE(A1,”, “,B1)
If you already have a comma in a cell and want to include it, you can use the CONCAT function.
Note: These methods can be used in any version of Excel.
Using TEXTJOIN to Add Commas Between Multiple Values:
If you want to add commas between multiple values from a range of cells, the TEXTJOIN function is ideal.
Formula: =TEXTJOIN(“, “,TRUE,A1:A5) The TEXTJOIN function allows you to specify a delimiter, in this case, a comma and space. We use TRUE to ignore empty cells. Finally, we refer to the range (A1:A5) from which we want to retrieve the values.
Upon pressing Enter, you will obtain all the values with a comma and space between each word.
These formulas provide different ways to add commas to cell text in Excel, allowing you to tailor your approach based on your specific requirements.