ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I sort a column a unique number? (https://www.excelbanter.com/excel-worksheet-functions/13787-how-do-i-sort-column-unique-number.html)

ChelleA

How do I sort a column a unique number?
 
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).


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.





"ChelleA" wrote:

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).


Myrna Larson

Assuming the data occupies A2:A100

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

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



On Thu, 17 Feb 2005 14:45:03 -0800, "ChelleA"
wrote:

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).



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.

On Thu, 17 Feb 2005 15:01:01 -0800, "Dan Knight"
wrote:

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.





"ChelleA" wrote:

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).



Gord Dibben

No correction necessary Myrna.


Gord

On Thu, 17 Feb 2005 17:27:00 -0600, Myrna Larson
wrote:

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.

On Thu, 17 Feb 2005 15:01:01 -0800, "Dan Knight"
wrote:

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.





"ChelleA" wrote:

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).



ChelleA

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

"Dan Knight" wrote:

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.





"ChelleA" wrote:

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).


ChelleA

Myrna, you were also correct thanks again.

"Myrna Larson" wrote:

Assuming the data occupies A2:A100

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

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



On Thu, 17 Feb 2005 14:45:03 -0800, "ChelleA"
wrote:

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).




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!
==============================================


"ChelleA" wrote in message
...
Myrna, you were also correct thanks again.

"Myrna Larson" wrote:

Assuming the data occupies A2:A100

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

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



On Thu, 17 Feb 2005 14:45:03 -0800, "ChelleA"
wrote:

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).







All times are GMT +1. The time now is 03:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com