Function Problems

How to Combine Excel Cells Without Extra Commas Using TEXTJOIN

Kushani NimanthikaKushani Nimanthika Nov 2, 2026 869 views

Question details

Combine data from multiple columns into a single cell while ignoring empty cells to prevent unwanted extra separators.

How to Use TEXTJOIN to Combine Excel Cells Without Extra Commas
Product
Excel
Device & OS
not provided
Scenario
Merging data lists, addresses, or names across multiple columns where some columns might be entirely or partially blank.
Observed behavior
Standard concatenation methods generate trailing or consecutive commas when encountering empty cells, requiring a dynamic method to ignore blanks.
Before you start

Ensure you are using Excel 2019, Microsoft 365, or a modern office suite like WPS Office, as older versions of Excel do not natively support the TEXTJOIN function.

Solution 1Recommended

Use the TEXTJOIN Function (Excel 2019 and newer)

The most efficient way to combine ranges while automatically ignoring empty cells.

The TEXTJOIN function is specifically designed to combine text from multiple ranges or arrays. By setting its second argument to TRUE, it automatically ignores any empty cells, guaranteeing a clean result without consecutive delimiters.

1
Select the target cell

Click on the cell where you want the combined text to appear.

2
Input the TEXTJOIN formula

Type the formula =TEXTJOIN(", ", TRUE, D2:H2). Replace D2:H2 with the actual range of cells you wish to combine.

3
Apply the formula

Press Enter. The TRUE argument explicitly tells Excel to ignore any blank cells in the specified range, successfully preventing extra commas.

Use the TEXTJOIN Function (Excel 2019 and newer)
Quick Tip: You can change the first argument to any delimiter you prefer, such as a hyphen "-", a space " ", or even a line break using CHAR(10).
Efficient Spreadsheet Data Management

Easily Combine Cells with TEXTJOIN in WPS Spreadsheet

WPS Spreadsheet fully supports the modern TEXTJOIN function, allowing you to merge cells seamlessly while ignoring blanks. It offers complete formula compatibility with Excel in a lightweight, user-friendly interface.

  1. 1. Open your file in WPS Spreadsheet: Launch WPS Office and open your .xlsx workbook containing the data you want to merge.
  2. 2. Enter the TEXTJOIN formula: Click on your target cell and type =TEXTJOIN(", ", TRUE, A1:E1), adjusting the range to fit your columns.
  3. 3. Execute the formula: Press Enter. The formula executes identically to Excel, effortlessly merging your data without extra separators.
Fully supports advanced functions like TEXTJOIN and CONCAT.100% format and formula compatibility with Microsoft Excel (.xlsx files).Lightweight software with rapid startup and smooth performance for large datasets.Free built-in data processing tools and cross-device cloud synchronization.
microsoft office alternative - wps office

Frequently Asked Questions

Why does TEXTJOIN result in a #NAME? error?

The #NAME? error occurs if you are using a version of Excel older than 2019 that does not support the TEXTJOIN function. You will need to upgrade your Office suite, switch to WPS Office, or rely on the traditional CONCATENATE workaround.

Can I use multiple different delimiters in TEXTJOIN?

Yes, you can use an array constant for the delimiter argument. For example, using =TEXTJOIN({", ","-"}, TRUE, A1:C1) will alternate between a comma and a hyphen as delimiters when combining the cell values.

Does TEXTJOIN work correctly with numbers and dates?

TEXTJOIN can combine numbers and dates, but dates might be converted to their underlying serial numbers. To preserve your specific date formatting, wrap the date cell reference in the TEXT function within your formula, like TEXT(A1, "mm/dd/yyyy").

What is the difference between CONCAT and TEXTJOIN?

While both functions can combine ranges, the CONCAT function does not accept a delimiter argument and cannot automatically ignore blank cells. TEXTJOIN is much more flexible because it allows you to specify a separator and a TRUE/FALSE flag for empty cells.