[TABLE="width: 243"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Hi,
I have a spreadsheet for working weekly on-call and I'm trying to create a formula for counting how many times work was carried out on a weekend between 17:00 and 19:00 hours.
I tried something like this, which is not working:
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;">=COUNTIFS(Oncall[Date],WEEKDAY(2>=6),
Oncall[Time Start],">=17:00",Oncall[Time Start],"<=19:00")
=SUMPRODUCT(--(WEEKDAY(Oncall[Date],2)>=6),
--(Oncall[Time Start]>="17:00"),--(Oncall[Time Start]<="19:00"))</code>[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] Example of the On-call spreadsheet below[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] [TABLE="width: 500"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Time start[/TD]
[TD]Time finish[/TD]
[/TR]
[TR]
[TD]14/06/15[/TD]
[TD]17:00[/TD]
[TD]18:00[/TD]
[/TR]
[TR]
[TD]14/06/15[/TD]
[TD]22:00[/TD]
[TD]22:10[/TD]
[/TR]
[TR]
[TD]15/06/15[/TD]
[TD]17:00[/TD]
[TD]19:00[/TD]
[/TR]
[TR]
[TD]20/06/15[/TD]
[TD]18:30[/TD]
[TD]20:30[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Any help will be greatly appreciated.
Thanks
<colgroup><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Hi,
I have a spreadsheet for working weekly on-call and I'm trying to create a formula for counting how many times work was carried out on a weekend between 17:00 and 19:00 hours.
I tried something like this, which is not working:
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;">=COUNTIFS(Oncall[Date],WEEKDAY(2>=6),
Oncall[Time Start],">=17:00",Oncall[Time Start],"<=19:00")
=SUMPRODUCT(--(WEEKDAY(Oncall[Date],2)>=6),
--(Oncall[Time Start]>="17:00"),--(Oncall[Time Start]<="19:00"))</code>[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] Example of the On-call spreadsheet below[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] [TABLE="width: 500"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Time start[/TD]
[TD]Time finish[/TD]
[/TR]
[TR]
[TD]14/06/15[/TD]
[TD]17:00[/TD]
[TD]18:00[/TD]
[/TR]
[TR]
[TD]14/06/15[/TD]
[TD]22:00[/TD]
[TD]22:10[/TD]
[/TR]
[TR]
[TD]15/06/15[/TD]
[TD]17:00[/TD]
[TD]19:00[/TD]
[/TR]
[TR]
[TD]20/06/15[/TD]
[TD]18:30[/TD]
[TD]20:30[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Any help will be greatly appreciated.
Thanks