Full Version: Distinct Count in subtotals
UtterAccess Discussion Forums > Microsoft® Office > Microsoft Excel
markmcrobie
Is there any way I can get a Distinct Count when using subtotals?

I have, for example, 4 rows. The company is in column A, the person's name in column B, and period ending date in C. So for a month I have 4 entries per man (one for each week). I want to use subtotals to show me a distinct count of the number of men per company. In my example above it should be 1, but using Count as it is just now shows 4 (4 x the same man)
Sligo
You can use DCount to get this.

=DCount("ElementName","TableName","Criteria")

I hope this helps!

- Sligo
markmcrobie
What would my "ElementName", "TableName" & "Criteria" be?

And I need this to be part of the Subtotals thing.
Sligo
Oops! I didn't see the Excel part.. my bad. I responded with an Access answer. I hope you'll forgive me.

- Sligo
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.