PedroGomez9
New Member
- Joined
- Feb 25, 2021
- Messages
- 6
- Office Version
- 2016
- Platform
- Windows
Morning all!
I'm looking to try and count the number of colleagues at my work that have been absent due to covid on a weekly basis.
I have their isolation start date in column N, their isolation end date in column O in a sheet named 'Absence Data'. Absence type is flagged as 'Covid' in column M.
On a separate sheet, 'Absence by Week', I have a list of the working weeks - week start date in column A, week end date in column B.
My issue is that often depending on the start date, a 10 day isolation can span across 3 separate weeks, but the start/end date will only be captured in 2 of those weeks and not in between. Example, a colleague starts isolation on Saturday of week 1, isolating all of week 2, and then also the first couple of days of week 3. using the formulas below, only the first and third weeks are captured.
=COUNTIFS('Absence Data'!$N:$N,">="&'Absence by Week'!$A2,'Absence Data'!$N:$N,"<="&'Absence by Week'!$B2) to capture those starting isolation in any given week, and;
=COUNTIFS('Absence Data'!M:M,"Covid",'Absence Data'!$O:$O,">="&'Absence by Week'!$A2,'Absence Data'!$O:$O,"<="&'Absence by Week'!$B2) to capture those ending isolation in any given week
Please let me know if anything isn't clear, or you need more supporting information to assist, and thank you in advance!
I'm looking to try and count the number of colleagues at my work that have been absent due to covid on a weekly basis.
I have their isolation start date in column N, their isolation end date in column O in a sheet named 'Absence Data'. Absence type is flagged as 'Covid' in column M.
On a separate sheet, 'Absence by Week', I have a list of the working weeks - week start date in column A, week end date in column B.
My issue is that often depending on the start date, a 10 day isolation can span across 3 separate weeks, but the start/end date will only be captured in 2 of those weeks and not in between. Example, a colleague starts isolation on Saturday of week 1, isolating all of week 2, and then also the first couple of days of week 3. using the formulas below, only the first and third weeks are captured.
=COUNTIFS('Absence Data'!$N:$N,">="&'Absence by Week'!$A2,'Absence Data'!$N:$N,"<="&'Absence by Week'!$B2) to capture those starting isolation in any given week, and;
=COUNTIFS('Absence Data'!M:M,"Covid",'Absence Data'!$O:$O,">="&'Absence by Week'!$A2,'Absence Data'!$O:$O,"<="&'Absence by Week'!$B2) to capture those ending isolation in any given week
Please let me know if anything isn't clear, or you need more supporting information to assist, and thank you in advance!