Hi all,
This is my first post, hope someone can help me.
I have inherited an excel sheet that tracks the activities on site, by date and personnel. It looks something like this.
[TABLE="class: grid, width: 100"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Site[/TD]
[TD]Person[/TD]
[/TR]
[TR]
[TD]21/4/2015[/TD]
[TD="align: center"]1[/TD]
[TD]A, B, C[/TD]
[/TR]
[TR]
[TD]21/4/2015[/TD]
[TD="align: center"]2[/TD]
[TD]D, E[/TD]
[/TR]
[TR]
[TD]22/4/2015[/TD]
[TD="align: center"]2[/TD]
[TD]A, B, C[/TD]
[/TR]
[TR]
[TD]22/4/2015[/TD]
[TD="align: center"]3[/TD]
[TD]D, E, F[/TD]
[/TR]
[TR]
[TD]22/4/2015[/TD]
[TD="align: center"]4[/TD]
[TD]A, C, F[/TD]
[/TR]
[TR]
[TD]22/4/2015[/TD]
[TD="align: center"]5[/TD]
[TD]B, E, F[/TD]
[/TR]
[TR]
[TD]23/4/2015[/TD]
[TD="align: center"]5[/TD]
[TD]A, B[/TD]
[/TR]
[TR]
[TD]23/4/2015[/TD]
[TD="align: center"]6[/TD]
[TD]A[/TD]
[/TR]
</tbody>[/TABLE]
I have to do the report how many days each person spend on sites (out of office).
Based on the table above this would be the result:
[TABLE="class: grid, width: 128"]
<tbody>[TR]
[TD]Person[/TD]
[TD]Days[/TD]
[/TR]
[TR]
[TD="align: center"]A[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]B[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]C[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]D[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]E[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]F[/TD]
[TD="align: center"]1[/TD]
[/TR]
</tbody>[/TABLE]
I've tried with COUNTIF, but simple COUNTIF function would not help as I need to count each person only once per given date. For example person A appears 5 times in total, but only on 3 different days. Or Person F appears 3 times, but only on 1 day so it was 1 day out of office.
So I'm stuck now.
One more thing, I can't change the appearance of original excel sheet.
Could anyone suggest how to make a formula that would automatically count this?
This is my first post, hope someone can help me.
I have inherited an excel sheet that tracks the activities on site, by date and personnel. It looks something like this.
[TABLE="class: grid, width: 100"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Site[/TD]
[TD]Person[/TD]
[/TR]
[TR]
[TD]21/4/2015[/TD]
[TD="align: center"]1[/TD]
[TD]A, B, C[/TD]
[/TR]
[TR]
[TD]21/4/2015[/TD]
[TD="align: center"]2[/TD]
[TD]D, E[/TD]
[/TR]
[TR]
[TD]22/4/2015[/TD]
[TD="align: center"]2[/TD]
[TD]A, B, C[/TD]
[/TR]
[TR]
[TD]22/4/2015[/TD]
[TD="align: center"]3[/TD]
[TD]D, E, F[/TD]
[/TR]
[TR]
[TD]22/4/2015[/TD]
[TD="align: center"]4[/TD]
[TD]A, C, F[/TD]
[/TR]
[TR]
[TD]22/4/2015[/TD]
[TD="align: center"]5[/TD]
[TD]B, E, F[/TD]
[/TR]
[TR]
[TD]23/4/2015[/TD]
[TD="align: center"]5[/TD]
[TD]A, B[/TD]
[/TR]
[TR]
[TD]23/4/2015[/TD]
[TD="align: center"]6[/TD]
[TD]A[/TD]
[/TR]
</tbody>[/TABLE]
I have to do the report how many days each person spend on sites (out of office).
Based on the table above this would be the result:
[TABLE="class: grid, width: 128"]
<tbody>[TR]
[TD]Person[/TD]
[TD]Days[/TD]
[/TR]
[TR]
[TD="align: center"]A[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]B[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]C[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]D[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]E[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]F[/TD]
[TD="align: center"]1[/TD]
[/TR]
</tbody>[/TABLE]
I've tried with COUNTIF, but simple COUNTIF function would not help as I need to count each person only once per given date. For example person A appears 5 times in total, but only on 3 different days. Or Person F appears 3 times, but only on 1 day so it was 1 day out of office.
So I'm stuck now.
One more thing, I can't change the appearance of original excel sheet.
Could anyone suggest how to make a formula that would automatically count this?