How do I sort a column a unique number?

C

ChelleA

I have a listing of proceedures for each patient. But I want to summarize
the number of patients with out having to manually have to go in and count.
Is there a formula, or function that can do this?
Example:
column A column B column C
Patient number Proceedure number proceedure date
4455 152 1/1/05
4455 188 1/1/05
4455 145 1/1/05

When you sum the column A it gives you a value of one for each occurance,
but I'd like to tell me the number of patients (1) at visited not number of
proceedures (3).
 
D

Dan Knight

ChelleA;
Doing a search in Excel Help for "How do I count unique values in a list"
returns the following advice:

"Sometimes you want to find out how many unique values there are in a range
that contains duplicate values....." use the following formula:

=SUM(IF(FREQUENCY(A2:A10,A2:A10)>0,1))

Where A2:A10 = equals the range of cells containing the data.
 
M

Myrna Larson

Assuming the data occupies A2:A100

=SUM(1/COUNTIF(A2:A100,A2:A100))

entered as an array formula with CTRL+SHIFT+ENTER.
 
M

Myrna Larson

Correct me if I'm wrong, but doesn't FREQUENCY work only with numeric data?
That's what she shows in the sample date, but I'm not sure that is always the
case.
 
G

Gord Dibben

No correction necessary Myrna.


Gord

Correct me if I'm wrong, but doesn't FREQUENCY work only with numeric data?
That's what she shows in the sample date, but I'm not sure that is always the
case.
 
C

ChelleA

This formula didn't work when my patient number was considered text...once I
converted the text to numbers it did. Thanks!
 
C

ChelleA

Myrna, you were also correct thanks again.

Myrna Larson said:
Assuming the data occupies A2:A100

=SUM(1/COUNTIF(A2:A100,A2:A100))

entered as an array formula with CTRL+SHIFT+ENTER.
 
R

RagDyeR

If there is a chance that the datalist might contain a blank cell, or that
you might have to delete an entry at a later time, you can try this, which
works with blanks, as well as text or numbers:

=SUMPRODUCT((A1:A30<>"")/COUNTIF(A1:A30,A1:A30&""))
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


Myrna, you were also correct thanks again.
 

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