Thread: [Solved] Count in Excel
View Single Post
 
Old 06-09-2011, 10:53 AM
Colin Legg's Avatar
Colin Legg Colin Legg is offline Windows 7 32bit Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

That means you want to count the distinct items, not the unique ones.

There are several formulas which can be used to do this, but none of them are simple. The most commonly used one, as outlined here, is:

Code:
=SUM(IF(FREQUENCY(IF(A1:A100<>"",MATCH("~"&A1:A100,A1:A100&"",0)),ROW(A1:A100)-ROW(A1)+1),1))
This is an array formula so when you type it into the formula bar you have to complete the entry with CTRL+SHIFT+ENTER, not just ENTER. You will also have to adjust the A1:A100 references to the range containing your names, and A1 to the first cell in the range containing your names.

If you prefer I can direct you to a VBA UDF which will make the formula simpler.
Reply With Quote