## How to count unique values or numbers in a column in Excel?

Assuming you have a list of values in a range of the worksheet, and now you want to know how many unique values are there. If you identify and count them one by one, it will waste a lot of times. So here I will introduce you some quick tricks to deal with this problem.

Count the number of unique values with Formulas

Count the number of unique values with Advanced Filter

#### Count the number of unique values with Formulas

There are some formulas can help you to quickly count the number of unique values in a range. If your data are numbers, for example, you have a column of numbers in range (A1:A10), see screenshot:

You can use the following formulas, please do as this:

1. Enter this formula =SUMPRODUCT(1/COUNTIF(A1:A10,A1:A10)) into a blank cell.

2. Then press Enter key, and the number of the unique value will be displayed. See screenshot:

Tips: 1. Here is another formula =SUM(IF(FREQUENCY(A1:A10, A1:A10)>0,1)) also can help you. Please apply anyone as you like. Both of the above formulas will count the unique values including the first duplicate as well.

2. If there are a range of text in your worksheet, the above formulas will not work, you should use this array formula: =SUM(IF(FREQUENCY(IF(LEN(A1:A10)>0,MATCH(A1:A10,A1:A10,0),""), IF(LEN(A1:A10)>0,MATCH(A1:A10,A1:A10,0),""))>0,1))

After enter the formula, then remember to press Shift + Ctrl + Enter keys, and the number of unique values has been displayed.

Notes:

• 1. The range A1:A10 in the above formulas are variable, you can change them as you need.
• 2. This formula also count the unique values including the first duplicate.
• 3. This formula works in a range of text and numbers as well.

#### Count the number of unique values with Advanced Filter

You can also use the Advanced Filter to extract the unique values from a column of data and paste them to a new location. Then with the ROWS function to count the number of unique values in the new range. The specific steps are as follows:

1. Click Data tab in the ribbon, and then click Advanced command, see screenshot:

2. And in the Advanced Filter dialog box:

 (1.) Select Copy to another location option under Action; (2.) In the List range section, click  button to select the range data that you want to use; (3.) In the Copy to section, click  button to specify a cell that you want to put the filtered unique values into; (4.) At last, check Unique records only option.

3. After finishing the settings, click OK, the unique values have been listed in a new column, see screenshot:

4. Then in a blank cell, enter the short formula =ROWS(E1:E8),and press Enter key on the keyboard. And the number of the unique values will be displayed.

#### Count the number of unique values with Kutools for Excel

Here, I will recommend you a useful tool- Kutools for Excel, with its Select Duplicate & Unique Cells function, you can quickly select the duplicate values or unique values and count the number of them.

 : with more than 300 handy Excel add-ins, free to try with no limitation in 30 days.

After installing Kutools for Excel, please do with the following steps:

1. Select the data range that you want to count the unique values.

2. Then click Kutools > Select > Select Duplicate & Unique Cells, see screenshot:

3. In the Select Duplicate & Unique Cells dialog box, choose Unique values only or All unique (Including 1st duplicates) as you want, at same time, you can also highlight the unique values by checking Fill backcolor or Fill font color under the Processing of results section, see screenshot:

4. (1.) If you choose Unique values only, only the unique values will be counted and selected at once. See screenshot:

(2.) If you choose All unique (Including 1st duplicates), all unique values which including the first duplicates will be counted and selected as following screenshot shown:

#### Demo: Count the number of unique values with Kutools for Excel

Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days.

Related article:

How to filter or select unique records from selected range in Excel?

### Best Office Productivity Tools

 🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions… Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ... Super Lookup: Multiple Criteria VLookup  |   Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup .... Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List .... Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ... Featured Features: Grid Focus   |  Design View   |   Big Formula Bar   |  Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells   |  Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ... Top 15 Toolsets:  12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

#### Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

• Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
• Open and create multiple documents in new tabs of the same window, rather than in new windows.
• Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!