Excel: count number of unique/distinct row in range with condition
Posted
by
Bertvan
on Super User
See other posts from Super User
or by Bertvan
Published on 2012-09-28T22:16:48Z
Indexed on
2012/09/29
3:42 UTC
Read the original article
Hit count: 453
microsoft-excel
I have a an excel sheet with:
- in Col A: week numbers
- in Col B: dates (timesheet entries)
I need to know the number of days worked for each week, so I need to the number of unique date entries per week number.
I found formula's (both array as non-array) that handle this for a fixed range, but I want to have the results in another column per week number.
So, the result of the added dataset below would be (the colon is just for clarity):
14: 2
15: 3
17: 6
20: 2
21: 3
If this is the source data:
14: 4/04/2012
14: 4/04/2012
15: 10/04/2012
15: 10/04/2012
15: 11/04/2012
17: 26/04/2012
17: 26/04/2012
17: 26/04/2012
17: 26/04/2012
17: 27/04/2012
17: 27/04/2012
20: 14/05/2012
20: 14/05/2012
21: 23/05/2012
21: 23/05/2012
21: 25/05/2012
© Super User or respective owner