ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Count a value excluding duplicates depending on a set criteria (https://www.excelbanter.com/excel-worksheet-functions/255047-count-value-excluding-duplicates-depending-set-criteria.html)

Jum

Count a value excluding duplicates depending on a set criteria
 
Hi, hope someone can help,

I have data that has multiple entrys for a date, but I only want to count
each day as one using a formula in excel 2007.

A B C D
1 Dept Crew Type Date
2 301 A 1 1/02/2009
3 302 C 2 1/02/2009
4 301 A 1 1/02/2009
5 301 A 1 2/02/2009
6 302 C 2 1/02/2009
7 303 D 2 1/02/2009
8 301 B 1 9/02/2009
9 301 A 2 1/02/2009
10 303 D 2 9/02/2009

E.g. I want to know how many days a crew worked in the above, 'Dept' =
"301", 'Crew' = "A", 'Type' = "1", how many days. Would equal 2 days.



T. Valko

Count a value excluding duplicates depending on a set criteria
 
One way...

Array entered** :

=COUNT(1/FREQUENCY(IF(A2:A10=301,IF(B2:B10="A",IF(C2:C10=1, D2:D10))),D2:D10))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP


"Jum" wrote in message
...
Hi, hope someone can help,

I have data that has multiple entrys for a date, but I only want to count
each day as one using a formula in excel 2007.

A B C D
1 Dept Crew Type Date
2 301 A 1 1/02/2009
3 302 C 2 1/02/2009
4 301 A 1 1/02/2009
5 301 A 1 2/02/2009
6 302 C 2 1/02/2009
7 303 D 2 1/02/2009
8 301 B 1 9/02/2009
9 301 A 2 1/02/2009
10 303 D 2 9/02/2009

E.g. I want to know how many days a crew worked in the above, 'Dept' =
"301", 'Crew' = "A", 'Type' = "1", how many days. Would equal 2 days.






All times are GMT +1. The time now is 01:03 PM.

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