counting names

B

brianjohnalford

I have a two columns A with surname and B with first name, but entered
multiple times:

eg:

Smith, John
Smith, John
Smith, Arthur,
Rabbit, Peter,
Rabbit, Peter
Rabbit, Peter

What's the easiest way to total up the number of people there are? In
this case 3.

Thanks
 
G

Guest

Try this:-

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

It;s an array so Ctrl+Shift+enter
 
G

Guest

I missed they are in 2 columns so concatenate them into a single column first

in C1 =A1&B1

Apply the formula to the concatenated column.

Mike
 
G

Guest

one way:

InC1: =A1&B1 and copy down

in D1: =SUM(1/COUNTIF($C$1:$C$6,$C$1:$C$6))

Enter with Ctrl+Shift+Enter

HTH
 
B

brianjohnalford

one way:

InC1: =A1&B1 and copy down

in D1: =SUM(1/COUNTIF($C$1:$C$6,$C$1:$C$6))

Enter with Ctrl+Shift+Enter

HTH







- Show quoted text -

Many thanks to both of you. both worked. Cheers
 

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

Similar Threads


Top