Excel Dynamic Unique List: Step-by-Step Guide
In this article
To build a dynamic unique list in Excel, use the UNIQUE function: select a cell, type =UNIQUE(A2:A100) and press Enter. The result spills a list of distinct values that updates automatically when the source data changes. If you are on an older Excel version without UNIQUE, use a combination of INDEX, MATCH and COUNTIF, or a PivotTable. This guide walks through the modern method first, then the fallback for older versions.
What You'll Need
- Excel 365, Excel 2021, or Excel for the web (UNIQUE is available in these). For Excel 2019 and earlier, see the fallback method in Step 6.
- A column of data with duplicates (e.g., customer names, product codes).
- An empty area to the right or below where the list can spill.
Step-by-Step
- Prepare your source data. Ensure the column has a header and no completely blank rows within the range. For example, put your data in A2:A100 with a header in A1.
- Select an empty cell where you want the unique list to start, such as C2. Make sure there is enough empty space below and to the right for the results to spill.
- Enter the UNIQUE formula. Type
=UNIQUE(A2:A100)and press Enter. Excel will spill the distinct values from A2:A100 into the cells below C2. - Check the spill. If you see a #SPILL! error, it means something is blocking the spill range. Clear the cells below C2 and try again.
- Make it dynamic. The list updates automatically when you add, remove, or change values in A2:A100. If you add data beyond row 100, extend the range or use a whole-column reference like
=UNIQUE(A:A)(but avoid including the header row if you don't want it in the list). - For older Excel versions (2019 and earlier), use a helper column and array formula. This method is more complex and requires entering formulas with Ctrl+Shift+Enter. Steps: (a) In B2, enter
=IF(COUNTIF($C$1:C1,A2)=0,A2,"")and copy down. (b) In C2, enter=IFERROR(INDEX($A$2:$A$100,MATCH(0,COUNTIF($C$1:C1,$A$2:$A$100),0)),"")as an array formula (Ctrl+Shift+Enter) and copy down. This produces a unique list but is not fully dynamic; you must copy formulas further if data grows. - Optional: Sort the unique list. Wrap the UNIQUE function in SORT:
=SORT(UNIQUE(A2:A100)). This gives an alphabetically sorted unique list that still updates automatically. - Optional: Filter out blanks. If your source range contains blanks, use
=UNIQUE(FILTER(A2:A100,A2:A100<>""))to exclude empty cells.
Common Mistakes
- Blocking the spill range: Placing the formula in a cell with existing data below or to the right causes #SPILL! error. Always ensure the area is clear.
- Including the header row: If you use
=UNIQUE(A:A)and A1 contains a header, the header will appear in the list. Either exclude it or use a specific range like A2:A100. - Forgetting to extend the range: If you add data beyond the referenced range, the unique list won't include it. Use a whole-column reference or a dynamic named range (e.g., using OFFSET or a table).
- Using the old array formula incorrectly: In older Excel, array formulas must be entered with Ctrl+Shift+Enter, and the helper column approach requires careful copying.
- Expecting UNIQUE to work in Excel 2019 or earlier: It is not available; you'll get a #NAME? error. Use the fallback method or upgrade.
Tips
- Convert your source data to an Excel Table (Ctrl+T). Then use
=UNIQUE(Table1[Column1])to make the formula automatically adjust as the table grows. - Combine UNIQUE with other dynamic array functions like SORT, FILTER, and SORTBY for powerful results.
- To count occurrences of each unique value, use
=COUNTIF(A2:A100, C2#)where C2# refers to the spill range. - If you need a unique list that ignores case, UNIQUE is case-sensitive by default. Use
=UNIQUE(LOWER(A2:A100))to normalize case, but note this changes the output to lowercase. - For a quick unique list without formulas, use Data > Remove Duplicates, but that is not dynamic.
Troubleshooting
- #SPILL! error: Clear the cells in the spill range. Check for merged cells or hidden rows/columns that might interfere.
- #NAME? error: Your Excel version does not support UNIQUE. Use the fallback method or upgrade to Microsoft 365.
- List not updating: Ensure the source range is correct and that calculation is set to automatic (Formulas > Calculation Options > Automatic).
- Blanks appearing in the list: Use the FILTER function as shown in Step 8, or adjust the range to exclude blank cells.
- Formula returns only one value: Check if the formula is entered as an array formula in older Excel; in dynamic array Excel, it should spill automatically. If not, ensure you have a dynamic array version.
Frequently Asked Questions
Can I use UNIQUE in Excel 2019?
No, UNIQUE is only available in Excel 365, Excel 2021, and Excel for the web. For Excel 2019 and earlier, use the array formula method described in Step 6.
How do I make the unique list ignore blanks?
Use =UNIQUE(FILTER(A2:A100, A2:A100<>"")). This filters out empty cells before extracting unique values.
Can I sort the unique list alphabetically?
Yes, wrap the UNIQUE function in SORT: =SORT(UNIQUE(A2:A100)).
Why do I get a #SPILL! error?
The spill range is blocked by existing data or merged cells. Clear the area below and to the right of the formula cell.
Does UNIQUE work with multiple columns?
Yes, you can use =UNIQUE(A2:B100) to get unique rows based on both columns. The result will be a list of unique combinations.
How do I count how many times each unique value appears?
Use =COUNTIF(A2:A100, C2#) where C2# is the spill reference for the unique list. This gives the count for each value.