excel - count people scheduled at work -
i have table shift start , end times, #n/a if person not due in @ all.
(sample)
mon start mon end 8:15 16:45 8:15 16:45 8:15 16:45 11:30 20:00 #n/a #n/a 8:15 16:45 8:45 17:15 9:30 18:00 13:30 22:00
i know how many people due on @ specified time
e.g. if select 9:00 time, expect result 5 query, , if select 21:00, expect 1.
i have tried countif =countif(a2:a93,"<"&d2)-countif(b2:b93,">="&d2)
, produces negative numbers start of day, , positive end of day.
with sumproduct, =sumproduct(--(a2:a93>=d2),--(b2:b93<d2))
, can 0
answer
could point out going wrong?
sumproduct won't ignore #n/a error values, if have excel 2007 or later try using countifs this
=countifs(a2:a93,"<="&d2,b2:b93,">="&d2)
Comments
Post a Comment