MrExcel Publishing
Your One Stop for Excel Tips & Solutions

count number of different values in a range ??


Posted by Ali G on August 30, 2001 7:02 AM

in any range of cells how can i count how many different variables i have rather than the total number of variables, ie, multiple incidences of a single variable should not increase calculated total. ??


Posted by Aladin Akyurek on August 30, 2001 7:15 AM

It sounds like you want a count of unique items in a range: If so,
download UNIQUE.xls from http://www.cpearson.com/excel.htm.

Aladin

Posted by iml on August 30, 2001 7:54 AM

non elegant way

If you can afford an extra column put this counter next to your top entry (assuming row A)
=IF(COUNTIF($A$1:A1,A1)=1,1,0)

Now copy it down and sum it at the bottom for your unique entries.

Good luck