# Excel : Count Unique values in a column

#### Best Online Course :SAS Programming with 50+ Case Studies - Explain Programming Concepts in Simple English - Live Projects & Case Studies - Job Placement Assistance - Get 10% off till Oct 26, 2017 - Batch starts from October 28, 2017

This tutorial explains how to count unique values in a column.

Sample Data
 Sample Data
Formula
=SUMPRODUCT(1/COUNTIF(B3:B15,B3:B15))
Logic
The text "Jhonson" appears 3 times so the unique value would be equal to  (1/3) + (1/3) + (1/3) = 1

How Formula works

COUNTIF counts the number of times each value appears.
 COUNTIF Formula Evaluation
Then all the values are divided by 1 and SUMPRODUCT sums all the fraction values.

Count Unique Values (Ignoring Blank Cells)
 Data with Blank cells
Formula (Ignoring Blank cells)
=SUMPRODUCT((B3:B15<>"")/COUNTIF(B3:B15,B3:B15&""))

Related Articles
1. 3 Ways to extract unique values
2. Count Unique values in multiple columns
3. Select and Count Duplicate values in Excel

#### Excel Tutorials : 100 Excel Tutorials

Deepanshu founded ListenData with a simple objective - Make analytics easy to understand and follow. He has close to 7 years of experience in data science and predictive modeling. During his tenure, he has worked with global clients in various domains like retail and commercial banking, Telecom, HR and Automotive.

While I love having friends who agree, I only learn from those who don't.

Let's Get Connected: Email | LinkedIn