Counting Unique "Items"

gdseric

New Member
Joined
Sep 17, 2002
Messages
2
Need help! I have struggled with this for two days! I know it's right in front of me, but...

If I wanted to count the unique occurrences of items in a range (in Excel, obviously), how do I do it? For example, I have 516 rows of data in a worksheet (all participant/student activity related)...approximately 120 different students comprising 516 different activities. I can count the number of activities, no sweat, and can even categorize them by activity code, but how do I count the number of unique participants (with unique social security numbers) in the worksheet? 516 social security numbers in a list, but only about 120 students.

I am trying hard not to breach confidentiality, hence the vague question!

Thanks in advance...
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
On 2002-09-18 11:35, gdseric wrote:
Need help! I have struggled with this for two days! I know it's right in front of me, but...

If I wanted to count the unique occurrences of items in a range (in Excel, obviously), how do I do it? For example, I have 516 rows of data in a worksheet (all participant/student activity related)...approximately 120 different students comprising 516 different activities. I can count the number of activities, no sweat, and can even categorize them by activity code, but how do I count the number of unique participants (with unique social security numbers) in the worksheet? 516 social security numbers in a list, but only about 120 students.

I am trying hard not to breach confidentiality, hence the vague question!

Thanks in advance...

Let A2:A520 house the SSNs.

Use one of:

=SUM(IF(LEN(A2:A520),1/COUNTIF(A2:A520,A2:A520)))

which you need to array enter using control+shift+enter (not just enter).

=COUNTDIFF(A2:A520)

which you enter normally.

COUNTDIFF is part of morefunc.xll, an add-in that you can download from:

http://longre.free.fr/english/index.html
 
Upvote 0
That did it, Aladin! I knew it was something simple. Thanks for the referral on the add-in. Didn't have that one! Eric
 
Upvote 0

Forum statistics

Threads
1,213,567
Messages
6,114,344
Members
448,570
Latest member
rik81h

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top