Function Problems

How to Return Unique Nonblank Values From an Excel Range

Chanuka GeekiyanageChanuka Geekiyanage Nov 10, 2026 868 views

Question details

The user needs to extract a list of distinct, non-blank text descriptions from a specific range so they can be copied to another worksheet.

How to Return Unique Nonblank Values From an Excel Range
Product
Excel
Device & OS
not provided
Scenario
Filtering out duplicate entries and blank cells from a dropdown-selected list to generate a clean, distinct dataset.
Observed behavior
The goal is to generate a dynamic spilled array of unique values starting from a designated cell, automatically excluding any empty rows.
Before you start

Ensure you are using a version of Excel or WPS Spreadsheet that supports Dynamic Array formulas, such as Microsoft 365, Office 2021, or the latest version of WPS Office.

Solution 1Recommended

Use UNIQUE and FILTER Functions to Exclude Blanks

Combine the UNIQUE and FILTER functions to dynamically extract distinct items while explicitly excluding blank cells from the results.

The UNIQUE function automatically extracts distinct values from a range, but it treats blank cells as a value (often returning a 0). By nesting the FILTER function inside UNIQUE, you can remove the blank cells before the unique values are calculated.

1
Select Destination Cell

Click on the cell where you want the extracted list to begin (for example, A15).

2
Enter the Formula

Type the formula: =UNIQUE(FILTER(C12:C23, C12:C23<>""))

3
Execute the Formula

Press the Enter key. The distinct, non-blank descriptions will automatically spill down the column.

Use UNIQUE and FILTER Functions to Exclude Blanks
Dynamic Updates: If the source data in C12:C23 changes, the spilled array will update automatically to reflect the new unique values.
Advanced Data Filtering

Extract Unique Values Effortlessly in WPS Spreadsheet

WPS Spreadsheet fully supports advanced dynamic array functions like UNIQUE and FILTER, allowing you to instantly clean your data and remove blank entries just like in Microsoft Excel.

  1. 1. Open your file: Launch WPS Spreadsheet and open your workbook containing the source data.
  2. 2. Select the target cell: Click on the cell where you want the clean, distinct list to start.
  3. 3. Input the formula: Type =UNIQUE(FILTER(C12:C23, C12:C23<>"")) and press Enter to instantly spill the results.
  4. 4. Copy the results: If you need to move the data, select the spilled array, copy it, and use 'Paste as Values' in your destination worksheet.
Full support for modern dynamic array formulas (UNIQUE, FILTER, SORT).Seamlessly compatible with Microsoft Excel (.xlsx) file formats.Free, lightweight, and user-friendly interface for faster data processing.
microsoft office alternative - wps office

Frequently Asked Questions

Why am I getting a #SPILL! error when using the UNIQUE function?

A #SPILL! error occurs when the destination range needed for the dynamic array is blocked by existing data. Clear the cells below your formula to provide enough empty space for the results to expand.

What if my version of Excel doesn't support the UNIQUE function?

If you are using an older version like Excel 2016 or 2019, you can use the 'Advanced Filter' feature under the Data tab to copy unique records to a new location. Alternatively, you can upgrade to WPS Office for free to access modern dynamic array formulas.

How can I sort the extracted unique values alphabetically?

You can wrap the SORT function around your existing formula. Simply update your formula to: =SORT(UNIQUE(FILTER(C12:C23, C12:C23<>""))).