L
Legacy 394724
Guest
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Team[/TD]
[TD]ID[/TD]
[TD]Name[/TD]
[TD]SickCalls[/TD]
[TD][/TD]
[TD]Incident[/TD]
[TD]ID[/TD]
[TD]Name[/TD]
[TD]Date[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Peter[/TD]
[TD]1[/TD]
[TD]Ana[/TD]
[TD]2[/TD]
[TD][/TD]
[TD]SICK[/TD]
[TD]1[/TD]
[TD]Ana[/TD]
[TD]01/02/2017[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]SICK[/TD]
[TD]1[/TD]
[TD]Ana[/TD]
[TD]01/03/2017[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]SICK[/TD]
[TD]1[/TD]
[TD]Ana[/TD]
[TD]01/23/2017[/TD]
[/TR]
</tbody>[/TABLE]
Good evening,
On cell D2 i have the following formula:
=SUMPRODUCT(--(G$2:G$4=$B2),--(F$2:F$4="SICK"),--IF(((G$3:G$5=$B2)*(F$3:F$5="SICK")),((I$2:I$4-I$3:I$5)>1),1))
I'd like the result to be the total number of occurrences someone called in sick.
Consecutive dates count as one single occurrence. Nonconsecutive count as individual occurrences.
At this time the formula only counts if I have other incidents, lets say "Tardy", between my sick calls...otherwise its counting everything as one single occurrence.
Id appreciate any help with this formula.
Best regards,
Ana
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Team[/TD]
[TD]ID[/TD]
[TD]Name[/TD]
[TD]SickCalls[/TD]
[TD][/TD]
[TD]Incident[/TD]
[TD]ID[/TD]
[TD]Name[/TD]
[TD]Date[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Peter[/TD]
[TD]1[/TD]
[TD]Ana[/TD]
[TD]2[/TD]
[TD][/TD]
[TD]SICK[/TD]
[TD]1[/TD]
[TD]Ana[/TD]
[TD]01/02/2017[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]SICK[/TD]
[TD]1[/TD]
[TD]Ana[/TD]
[TD]01/03/2017[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]SICK[/TD]
[TD]1[/TD]
[TD]Ana[/TD]
[TD]01/23/2017[/TD]
[/TR]
</tbody>[/TABLE]
Good evening,
On cell D2 i have the following formula:
=SUMPRODUCT(--(G$2:G$4=$B2),--(F$2:F$4="SICK"),--IF(((G$3:G$5=$B2)*(F$3:F$5="SICK")),((I$2:I$4-I$3:I$5)>1),1))
I'd like the result to be the total number of occurrences someone called in sick.
Consecutive dates count as one single occurrence. Nonconsecutive count as individual occurrences.
At this time the formula only counts if I have other incidents, lets say "Tardy", between my sick calls...otherwise its counting everything as one single occurrence.
Id appreciate any help with this formula.
Best regards,
Ana