Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Distinct Count in Excel

Status
Not open for further replies.

shelby55

Technical User
Jun 27, 2003
1,229
CA
Hi

I'm using Excel 2003.

I have a raw data worksheet which has one line of data per patient visit. One of the data elements is discharge date. I would like to reference distinct count of discharge date in a cell. I've created a named range for it (the database will grow so it needs to be dynamic) but how do I reference distinct count for this?

Thanks.
 


What do yoju mean by 'distinct' count? Please post an example.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Hi

Thanks for replying. Distinct count as in distinct number of dates and not number of visits. There could be multiple discharges on the same date but I only want the data counted once.

I did what I think was an okay work around by creating a new worksheet with 3 years' of dates listed. Then I created named ranges for the date list but also the dates within the raw data and on a worksheet within the workbook I used:

Code:
=SUM(IF(FREQUENCY(DisDate, Dates)>0,1))

It seems to be working.....
 


You only need to reference the one range...
[tt]
=SUM(IF(FREQUENCY(DisDate, DisDate)>0,1))
[/tt]

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top