good day
my workbook consists of sheets depicting each day of the month. (1st to 31st)
i want to count the amount of people that went absent in a month. the staff are working shifts. if i just do a countif(s) then i am counting the amount of times annual leave occurs. this is obviously wrong as one person can be marked as annual leave for a number of days. if Paul and Peter was on shift A, then if Paul was on annual leave from 1st of the month till the 10th that will count as 1 occurrence. if Peter was on annual leave from the 7th till the 20th that counts as 1 occurrence but my total count on the Summary sheet for shift A will show 2.
If Jamie and john was on shift B with the same dates then the summary sheet will show that for shift B.
here is the breakdown of the workbook:
1. Named Range = SheetList to contain all sheets in workbook
2. F5 = cell showing specific shift on duty (A, B, C or D)
3. Range D919 = cells containing staff names
4. Range E9:E19 = cells containing absenteeism reason ie. Annual Leave, Sick, etc
5. Summary Sheet B5 = where i wish to show how many staff was absent for shift A
6. Summary Sheet B6 = where i wish to show how many staff was absent for shift B
i tried an array formula but this doesnt make provision for the same person marked as absent for a number of days.... therefore the totals are skewed.
{=SUM(IF(COUNTIFS(INDIRECT("'"&SheetList&"'!F5");B$11);COUNTIFS(INDIRECT("'"&SheetList&"'!E9:E37");$B12)))}
your assistance is appreciated...
my workbook consists of sheets depicting each day of the month. (1st to 31st)
i want to count the amount of people that went absent in a month. the staff are working shifts. if i just do a countif(s) then i am counting the amount of times annual leave occurs. this is obviously wrong as one person can be marked as annual leave for a number of days. if Paul and Peter was on shift A, then if Paul was on annual leave from 1st of the month till the 10th that will count as 1 occurrence. if Peter was on annual leave from the 7th till the 20th that counts as 1 occurrence but my total count on the Summary sheet for shift A will show 2.
If Jamie and john was on shift B with the same dates then the summary sheet will show that for shift B.
here is the breakdown of the workbook:
1. Named Range = SheetList to contain all sheets in workbook
2. F5 = cell showing specific shift on duty (A, B, C or D)
3. Range D919 = cells containing staff names
4. Range E9:E19 = cells containing absenteeism reason ie. Annual Leave, Sick, etc
5. Summary Sheet B5 = where i wish to show how many staff was absent for shift A
6. Summary Sheet B6 = where i wish to show how many staff was absent for shift B
i tried an array formula but this doesnt make provision for the same person marked as absent for a number of days.... therefore the totals are skewed.
{=SUM(IF(COUNTIFS(INDIRECT("'"&SheetList&"'!F5");B$11);COUNTIFS(INDIRECT("'"&SheetList&"'!E9:E37");$B12)))}
your assistance is appreciated...