Function Problems

How to Combine Unique Values from Multiple Excel Cells into One Cell

Huda QurayshiHuda Qurayshi Nov 10, 2026 869 views

Question details

The user wants to extract distinct values from a multi-cell data range, ignore blank cells and duplicates, and merge the results into a single text string within one cell.

Combine Unique Values from Multiple Excel Cells into One Cell
Product
Excel / WPS Spreadsheet
Device & OS
not provided
Scenario
Consolidating scattered data points or lists from a two-dimensional cell range into a clean, comma-separated summary cell.
Observed behavior
A single cell needs to display all unique items from a specified range without manual copying and pasting.
Before you start

Ensure you are using a recent version of your spreadsheet software (like Microsoft 365, Excel 2021, or the latest WPS Office) that supports modern dynamic array functions such as UNIQUE and TOCOL.

Solution 1Recommended

Use TEXTJOIN, UNIQUE, and TOCOL to Combine Values

This is the most efficient method to flatten a 2D range into a single list, remove duplicate entries, and join the remaining unique items into one cell.

The TOCOL function converts a two-dimensional array into a single column. The UNIQUE function then filters out any duplicate values. Finally, the TEXTJOIN function merges these unique items together, separated by a specified delimiter.

1
Select the destination cell

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

2
Input the formula

Type the formula: =TEXTJOIN(", ", TRUE, UNIQUE(TOCOL(A1:C10, 1))) into the formula bar. Replace A1:C10 with your actual data range.

3
Apply the formula

Press Enter. The cell will now display all unique values separated by a comma and a space.

Use TEXTJOIN, UNIQUE, and TOCOL to Combine Values
Ignoring Blank Cells: Setting the second argument of TEXTJOIN to TRUE, and the second argument of TOCOL to 1, ensures that all blank cells in the original range are ignored.
Advanced Spreadsheet Functions

Process and Combine Data Effortlessly with WPS Office

WPS Spreadsheet provides robust support for modern formulas, making it incredibly easy to process complex data arrays, filter unique values, and merge text without hassle.

  1. 1. Open WPS Spreadsheet: Launch WPS Office and open your workbook containing the data range.
  2. 2. Select a target cell: Click on the cell where you want the final combined string to be output.
  3. 3. Enter the formula: Type the combined TEXTJOIN and UNIQUE formula matching your data range.
  4. 4. Press Enter: Hit Enter to instantly calculate and display the unique values in one single cell.
Seamlessly supports advanced array formulas for data manipulation.100% compatible with Microsoft Excel formats (.xlsx) and functions.Lightweight, fast-loading, and free to use across multiple platforms.Clean, tabbed interface for managing multiple workbooks efficiently.
microsoft office alternative - wps office

Frequently Asked Questions

What if my version of Excel doesn't have the TOCOL function?

If you are using an older version that lacks TOCOL, you may need to use Power Query to unpivot your data into a single column first, or use a VBA macro (such as a custom User Defined Function) to collect unique values.

How can I change the separator between combined values?

The first argument in the TEXTJOIN function represents the delimiter. You can easily change ", " to any other character string you prefer, such as " - ", " | ", or even CHAR(10) for a line break.

Why does the formula return a #NAME? error?

The #NAME? error typically occurs if your spreadsheet software version does not support newer functions like UNIQUE, TOCOL, or TEXTJOIN, or if you accidentally misspelled one of the function names.

Does this formula ignore blank cells completely?

Yes. The 'TRUE' argument in the TEXTJOIN function tells it to ignore any empty text strings, and the '1' parameter in the TOCOL function instructs it to specifically ignore blanks before passing the data to the UNIQUE function.