Concatenating Multiple Cells with a Comma Delimiter in Excel

📅 Jan 11, 2026 📝 Sarah Miller

Manually merging text across hundreds of Excel cells with comma delimiters is a tedious, error-prone struggle that drains valuable administrative time. While organizations often look to standard funding sources to drive operational growth, optimizing daily software workflows is an equally vital efficiency lever.

Fortunately, mastering the TEXTJOIN function grants professionals immediate, automated formatting capabilities. As a necessary stipulation, please note this function requires Excel 2019 or Microsoft 365. Consolidating regional sales lists or inventory SKUs using this formula serves as clear proof of its time-saving value. Below, we will break down the exact syntax and steps required to implement this solution seamlessly.

Concatenating Multiple Cells with a Comma Delimiter in Excel

Combining data from multiple cells into a single, cohesive string is one of the most common tasks in Microsoft Excel. Whether you are preparing lists of email addresses, formatting product SKUs for a database upload, compiling names, or structuring data for an external system, you will frequently need to join strings together. More specifically, you will often need to separate these values with a specific character-most commonly, a comma.

Historically, Excel users had to rely on tedious formulas that required manual cell-by-cell selection. However, with modern Excel updates, Microsoft has introduced powerful functions that make this process seamless. In this comprehensive guide, we will explore every major method to concatenate multiple cells with a comma delimiter, ranging from state-of-the-art functions like TEXTJOIN to legacy formulas, VBA scripts, and Power Query techniques. This ensures you can successfully accomplish this task regardless of the Excel version you are using.

Method 1: The Modern Champion – The TEXTJOIN Function

If you are using Excel 365, Excel 2019, Excel 2021, or Excel for the Web, the absolute best tool for this job is the TEXTJOIN function. Unlike older functions, TEXTJOIN allows you to specify a; once and apply it across an entire range of cells. Furthermore, it includes a built-in mechanism to gracefully handle empty cells.

The Syntax of TEXTJOIN

=TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...)
  • delimiter: The character(s) you want to place between each text value. To use a comma and a space, enter ", " (wrapped in double quotes).
  • ignore_empty: A boolean value. Set this to TRUE to skip empty cells, preventing consecutive delimiters (e.g., "Apple,, Banana"). Set to FALSE to include empty cells anyway.
  • text1, text2, ...: The cells, ranges, or text strings you wish to join. This can be a continuous range like A1:A10.

Step-by-Step Example

Imagine you have a list of ingredients in cells A2 through A6: "Apples", "Bananas", "", "Cherries", and "Dates". Note that cell A4 is empty.

To join these items with a comma and space while skipping the empty cell, enter the following formula in your target cell:

=TEXTJOIN(", ", TRUE, A2:A6)

The Output: Apples, Bananas, Cherries, Dates

If you had set the second argument to FALSE, the output would have been Apples, Bananas, , Cherries, Dates, leaving an awkward extra comma where the empty cell resided. Because of this adaptability, TEXTJOIN is the preferred choice for modern spreadsheet design.

Method 2: The Ampersand Operator (&) – Compatible with All Versions

If you are working on an older version of Excel (such as Excel 2010 or 2013) that does not support modern functions, you can fall back on the classic Ampersand (&) operator. The ampersand acts as an explicit joining agent between text blocks.

How to Write the Formula

To concatenate cells A2, B2, C2, and D2 with a comma and space, you must explicitly type out the reference and; each cell:

=A2 & ", " & B2 & ", " & C2 & ", " & D2

The Problem with Empty Cells (and How to Fix It)

The primary drawback of the ampersand method is its handling of blank cells. If cell C2 is empty in the example above, the output will yield a redundant comma: Value1, Value2, , Value4.

To bypass this issue, you must wrap each cell in an IF statement to check if it contains data be; e adding the comma. This makes the; mula significantly longer and more complex:

=A2 & IF(B2<>" ", ", " & B2, "") & IF(C2<>" ", ", " & C2, "") & IF(D2<>" ", ", " & D2, "")

While this method is tedious; large ranges, it is highly reliable and functional across every version of Excel ever created.

Method 3: CONCATENATE and CONCAT Functions

Excel features two built-in functions specifically designed; joining text: CONCATENATE (legacy) and CONCAT (introduced in Excel 2016 to replace CONCATENATE).

Using CONCATENATE (Legacy)

The CONCATENATE function behaves similarly to the ampersand operator. It does not accept ranges; you must select each cell individually and hardcode the commas:

=CONCATENATE(A2, ", ", B2, ", ", C2)

Because this offers no functional advantage over the & operator and is actually more verbose to type, it is rarely recommended in modern workflows.

Using CONCAT (Excel 2016 and Newer)

The newer CONCAT function is a step up because it accepts ranges (e.g., =CONCAT(A2:D2)). However, CONCAT does not allow you to specify a delimiter. If you run =CONCAT(A2:D2), it will smash all the text together with no spaces or commas (e.g., "AppleBananaCherries").

To use CONCAT with commas, you are; ced to; mat it similarly to the legacy version:

=CONCAT(A2, ", ", B2, ", ", C2)

There; e, unless you are restricted from using TEXTJOIN, there is little reason to choose CONCAT or CONCATENATE when a; required.

Method 4: Advanced Conditional Concatenation (TEXTJOIN + IF)

One of the most powerful aspects of modern Excel formulas; the ability to nest array logic within your calculations. Suppose you want to concatenate values from a column, but only if they meet a specific criterion. You can achieve th; by combining TEXTJOIN with the IF function.

The Scenario

Imagine you have a spreadsheet tracking project tasks. Column A contains the names of team members, and Column B contains their assigned tasks. You want to generate a single cell that l; ts all tasks assigned to "Sarah", separated by commas.

Column A (Name) Column B (Task)
SarahDraft Contract
JohnReview Budget
SarahClient Call
MichaelSystem Audit
SarahSend Invoice

To concatenate all of Sarah's tasks, enter the following formula:

=TEXTJOIN(", ", TRUE, IF(A2:A6="Sarah", B2:B6, ""))

How It Works:

The IF statement checks the range A2:A6. If a cell equals "Sarah", it returns the corresponding task from B2:B6. If it does not equal "Sarah", it returns an empty string (""). The TEXTJOIN function then gathers these results, ignores the empty strings, and links the remaining tasks together.

The Output: Draft Contract, Client Call, Send Invoice

Note: If you are using Excel 2019, you may need to press Ctrl + Shift + Enter to execute this as an array formula. In Excel 365 and 2021, it works natively as a dynamic array.

Method 5: For Legacy Excel – Creating a Custom VBA Function

If you are stuck on an older version of Excel (such as Excel 2013) but need to merge large ranges without typing hundreds of ampersands, you can build a custom User-Defined Function (UDF) using Visual Basic for Applications (VBA). This acts exactly like TEXTJOIN.

How to Implement the Code

  1. Press ALT + F11 to open the VBA Editor.
  2. Click Insert > Module from the top menu.
  3. Copy and paste the following code into the empty module window:
Function CustomTextJoin(Delimiter As String, IgnoreEmpty As Boolean, TargetRange As Range) As String
    Dim Cell As Range
    Dim Result As String
    
    For Each Cell In TargetRange
        If Not (IgnoreEmpty And Trim(Cell.Value) = "") Then
            Result = Result & Cell.Value & Delimiter
        End If
    Next Cell
    
    ' Remove trailing delimiter
    If Len(Result) > 0 Then
        Result = Left(Result, Len(Result) - Len(Delimiter))
    End If
    
    CustomTextJoin = Result
End Function
  1. Close the VBA Editor and return to your worksheet. Save your workbook as an Excel Macro-Enabled Workbook (.xlsm).

Now, you can use your newly created function directly inside your spreadsheet like any normal formula:

=CustomTextJoin(", ", TRUE, A2:A20)

Method 6: Merging Columns with Power Query

For large datasets cons; ting of thousands of rows where you need to systematically merge entire columns with a comma delimiter, formulas can sometimes slow down workbook performance. In these scenarios, Power Query; the ideal engine.

Step-by-Step Power Query Merging

  1. Select your data range, navigate to the Data tab, and click From Table/Range.
  2. In the Power Query Editor window, hold down the Ctrl key and click the headers of the columns you w; h to merge.
  3. Right-click on one of the selected column headers and choose Merge Columns.
  4. In the popup window, locate the Separator dropdown menu. Select Custom.
  5. Type a comma and a space (, ) in the text box below.
  6. Provide a name for your new merged column (e.g., "Merged Output") and click OK.
  7. Go to the Home tab and click Close & Load to return your merged data to a new Excel sheet.

Power Query; highly advantageous because it handles null values beautifully and can easily process hundreds of thousands of rows of data without straining Excel's computing resource boundaries.

Summary: Choosing the Right Method

To help you decide which approach is best suited for your specific situation, review this quick comparison table:

Method Excel Version Compatibility Handles Blank Cells? Best For...
TEXTJOIN Office 365, 2019, 2021+ Yes (Automatic) General everyday use, formulas over ranges.
Ampersand (&) All Versions No (Requires manual IF logic) Quick merges of 2 or 3 cells on legacy systems.
CONCAT / CONCATENATE All Versions No Standard joining without range inputs.
VBA / Custom UDF All Desktop Versions Yes (Via code logic) Mimicking modern functionality on old Excel versions.
Power Query 2010 (with add-in), 2013+ Yes Large scale data transformation and database prep.

By mastering these various approaches, you will never find yourself struggling to format lists or string data together again. Whether you have the latest cloud-based capabilities of Excel 365 or are maintaining legacy tracking sheets, a comma-separated list is always just a few keystrokes away.

Disclaimer:
The documents and templates provided on this page are for informational and illustrative purposes only. They do not constitute professional, legal, or financial advice, and should not be relied upon as such. Because individual circumstances and regulatory requirements vary, these materials may not be suitable for your specific needs. We recommend consulting with a qualified professional before adapting or using any of these examples for official or commercial purposes.