MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Counting different values within a column

Posted by Andrew Cooke on December 13, 2000 6:41 AM

Apoligies to all for the simplicity of the query but although I use Excel I don't use formulas that often.

A column of data eg 1,2,2,3,5,5 If I use try to use "count" formula I get an answer of 6, which is right but I want to count the number of different values ie 1 2 3 & 5 to give an answer of 4 !

All suggestions gratefully accepted, thanks in advance

Posted by Tim Francis-Wright on December 13, 2000 7:08 AM

Chip Pearson's site has a good reference on this:

Excerpts follow:


returns the number of unique entries in Range1. It will not count blanks at all.

If your data does not have any blanks in the range, you can use the following Array Formula, developed by David Hager:


If your data has only numeric values or blank cells, with no text or string values, you can use the formula


to count the number of unique values. This will count only the number of unique numeric values, not including text values.