How to Concatenate Rows in Excel with Comma (4 Easy Methods)

We’ll use the following example where we have a list of G-7 countries in 7 rows (B5 to B11). We’ll put the entire list in a single cell, with the country names separated by commas.

concatenate rows in excel with comma


Method 1 – Utilize the CONCAT Function to Concatenate Rows

Steps:

  • Insert another column containing delimiter commas.

  • We have inserted the comma ”,” in each cell from C5 to C10 but kept the cell C11 empty because we don’t want a comma at the end of the joint text.
  • In cell F7, insert the following formula.
=CONCAT(B5:C11)

Utilize the CONCAT Function to Concatenate Rows

  • Press the Enter key, and you will see your desired result.

Utilize the CONCAT Function to Concatenate Rows


Method 2 – Concatenate Rows by Applying the CONCATENATE Function

Steps:

  • Rearrange the data into a single row since this function doesn’t work properly when data is in multiple rows.

  • In the B7 cell, use the following formula:
=CONCATENATE(C4:I4&",")

Concatenate Rows By Applying CONCATENATE Function

  • Select the portion C4:I4&”,” in the formula and press F9. It will transform the cell reference into cell content.

Concatenate Rows By Applying CONCATENATE Function

  • Eliminate the braces {} from both ends.

  • Press Enter. You will get your desired result.

Concatenate Rows By Applying CONCATENATE Function


Method 3 – Utilize the TEXTJOIN Function to Concatenate Rows

We’ve inserted blank values in the dataset, which need to be ignored.

Steps:

  • Enter the formula below in cell D7.
=TEXTJOIN(",",TRUE,B5:B13)

Utilize TEXTJOIN Function to Concatenate Rows

The TEXTJOIN function uses the comma argument as a delimiter, with the second argument TRUE allowing it to ignore empty cells.

  • Hit Enter.

Utilize TEXTJOIN Function to Concatenate Rows


Method 4 – Concatenate Rows Using the Ampersand Operator

Steps:

  • Go to cell B7 and insert an equals sign (=) in it.

  • Select cell C4 and write &“,”.

Concatenate Rows Using Ampersand Operator

  • Insert a comma, select D4, and write &“,”.

Concatenate Rows Using Ampersand Operator

  • Repeat for all cells.
  • Here is the final formula for the example:
=C4&","&D4&","&E4&","&F4&","&G4&","&H4&","&I4

Concatenate Rows Using Ampersand Operator


Things to Remember

  • Try to use the CONCAT function instead of CONCATENATE function as it is becoming obsolete.
  • Do not use the Ampersand Operator if your data set is very large.
  • All the methods described here except the CONCATENATE function are applicable to both row-wise and column-wise joining

Download the Practice Workbook


<< Go Back to Range | Concatenate | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Aniruddah Alam
Aniruddah Alam

Md. Aniruddah Alam, a graduate of Bangladesh University of Engineering & Technology, Dhaka, holds a BSc.Engg in Naval Architecture & Marine Engineering. Joining Softeko in August 2022 as an Excel and VBA content developer, he has authored 90+ articles, covering fundamental to advanced Excel topics. He actively develops VBA codes for Excel automation and offers solutions in the Exceldemy Forum. Beyond work, he finds leisure in reading books, and taking relaxing walks, showcasing well-rounded blend of professional and... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo