Extract Unique Week Numbers Automatically in Excel
Question details
The user needs a formula to extract a list of unique week numbers from a dynamic dataset while automatically ignoring blank cells.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Managing a dynamic list of data where the source updates continuously, requiring an automated extraction of unique week numbers to summarize or analyze the timeline.
- Observed behavior
- The desired formula should dynamically output distinct week numbers, exclude any empty cells in the range, and update automatically when new week numbers are added or removed.
Verify whether you are using a modern spreadsheet version (like Microsoft 365, Excel 2021, or WPS Office) that supports dynamic arrays, as this will determine which formula method you need to use.
Use UNIQUE and FILTER Functions (Modern Excel)
The quickest and most efficient way to extract unique, non-blank values dynamically using modern array formulas.
In modern spreadsheet applications, dynamic array formulas allow a single function to return multiple values that automatically 'spill' into adjacent cells. Combining UNIQUE and FILTER is the perfect approach for this task.
Click on the empty cell where you want the dynamic list of unique week numbers to begin.
Type the formula `=UNIQUE(FILTER(A2:A30, A2:A30<>""))`, replacing A2:A30 with your actual source data range.
Press Enter. The unique, non-blank week numbers will automatically spill down the column.

Use INDEX, MATCH, and COUNTIF Array Formula (Older Excel Versions)
A backward-compatible method for extracting unique values in versions that do not support dynamic arrays.
Use WPS Spreadsheet to Extract Unique Values Instantly
WPS Spreadsheet fully supports modern dynamic array functions like UNIQUE and FILTER, allowing you to easily extract unique week numbers without complex legacy array formulas.
- 1. Open your data file: Launch WPS Office and open your workbook in WPS Spreadsheet.
- 2. Select the destination cell: Click on the cell where you want the unique list to appear.
- 3. Apply the UNIQUE formula: Type `=UNIQUE(FILTER(A2:A30,A2:A30<>""))` and press Enter.
- 4. View dynamic results: The results will dynamically spill into the rows below and update instantly as you change the source data.

Frequently Asked Questions
How can I automatically sort the extracted unique week numbers?
You can wrap your dynamic formula inside the SORT function. Use `=SORT(UNIQUE(FILTER(A2:A30,A2:A30<>"")))` to extract the unique, non-blank values and organize them in ascending order automatically.
Why is my UNIQUE function returning a #NAME? error?
The #NAME? error typically occurs if you are using an older version of Excel that does not support the UNIQUE function. To resolve this, use the INDEX and MATCH array formula method, or upgrade to a modern suite like WPS Office or Microsoft 365.
Can I use Advanced Filter to get unique values instead of a formula?
Yes. You can go to the Data tab, click 'Advanced' in the Sort & Filter group, select 'Copy to another location', and check the 'Unique records only' box. However, unlike formulas, this method will not update automatically if the source data changes.
Why does my array formula show curly braces {}?
Curly braces indicate that the formula was entered as a traditional array formula by pressing Ctrl+Shift+Enter. This is required in older Excel versions to process operations across multiple cells simultaneously.




