Count number of different entries?

G

Guest

Hello-

Is there a simple way to count the number of different entries in a column?

ex. I have multiple rows for the same "salesperson". I have many
salespersons. I want to know how many salespersons I have.

I guess I'm counting non-duplicate entries in a column.

Thank you,
I'm learning lots!
 
G

Guest

This is an array formula, so enter it with Ctrl+Shift+Enter

=SUMPRODUCT((A1:A100<>"")/COUNTIF(A1:A100,A1:A100&""))
 
R

Ron Rosenfeld

Hello-

Is there a simple way to count the number of different entries in a column?

ex. I have multiple rows for the same "salesperson". I have many
salespersons. I want to know how many salespersons I have.

I guess I'm counting non-duplicate entries in a column.

Thank you,
I'm learning lots!

Depends on whether or not there are blanks in the range.

If no blanks:

=SUM(1/COUNTIF(A1:A10,A1:A10))

entered as an *array* formula.

If there may be blanks, even if they are at the end of the range, then:

=SUM(IF(FREQUENCY(IF(LEN(A1:A100)>0,MATCH(A1:A100,A1:A100,0),""),
IF(LEN(A1:A100)>0,MATCH(A1:A100,A1:A100,0),""))>0,1))

also entered as an *array* formula.

To enter an *array* formula, after typing or pasting the formula into the
formula bar, hold down <ctrl><shift> while hitting <enter>. Excel will place
braces {...} around the formula.


--ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top