KuraiChikara
Board Regular
- Joined
- Nov 16, 2016
- Messages
- 111
- Office Version
- 2013
- Platform
- Windows
Hello,
I am trying to perform a task similar to what a COUNTIFS would do but I can't seem to get it.
Columns A-F are used.
I have agents, a work week (IE F--MTWR), start time and Criteria. # of agents or column D is where the formula is.
Example:
If I want to see how many people have a 6:30 AM shift, that's 7 people below.
But if I want to find the number of agents who work at 6:30 AM and have a F--MTWR schedule (which should be 3) I can't calculate that.
The formula I've tried is the following and it calculates zero:
=COUNTIFS(B2:C8,E2,B2:C8,F2)
[TABLE="width: 594"]
<tbody>[TR]
[TD]Agent[/TD]
[TD]Week[/TD]
[TD]Time[/TD]
[TD]# of Agents[/TD]
[TD]Start Criteria[/TD]
[TD]Week Criteria[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]F--MTWR[/TD]
[TD]6:30 AM[/TD]
[TD] 7[/TD]
[TD]6:30 AM[/TD]
[TD]F--MTWR[/TD]
[/TR]
[TR]
[TD]Jack[/TD]
[TD]F--MTWR[/TD]
[TD]6:30 AM[/TD]
[TD] 0[/TD]
[TD]6:45 AM[/TD]
[TD]--SMTWR[/TD]
[/TR]
[TR]
[TD]Bill[/TD]
[TD]F--MTWR[/TD]
[TD]6:30 AM[/TD]
[TD][/TD]
[TD]7:00 AM[/TD]
[TD]FY--TWR[/TD]
[/TR]
[TR]
[TD]Sam[/TD]
[TD]FY--TWR[/TD]
[TD]6:30 AM[/TD]
[TD][/TD]
[TD]7:30 AM[/TD]
[TD]-YSMTW-[/TD]
[/TR]
[TR]
[TD]Susan[/TD]
[TD]FYSMT--[/TD]
[TD]6:30 AM[/TD]
[TD][/TD]
[TD]8:00 AM[/TD]
[TD]FYSMT--[/TD]
[/TR]
[TR]
[TD]Karen[/TD]
[TD]FYSM--R[/TD]
[TD]6:30 AM[/TD]
[TD][/TD]
[TD]8:30 AM[/TD]
[TD]FYSM--R[/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]FYS--WR[/TD]
[TD]6:30 AM[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/TD]
[TD]4:00 PM[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]5:00 PM[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]10:00 PM[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]10:30 PM[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I am trying to perform a task similar to what a COUNTIFS would do but I can't seem to get it.
Columns A-F are used.
I have agents, a work week (IE F--MTWR), start time and Criteria. # of agents or column D is where the formula is.
Example:
If I want to see how many people have a 6:30 AM shift, that's 7 people below.
But if I want to find the number of agents who work at 6:30 AM and have a F--MTWR schedule (which should be 3) I can't calculate that.
The formula I've tried is the following and it calculates zero:
=COUNTIFS(B2:C8,E2,B2:C8,F2)
[TABLE="width: 594"]
<tbody>[TR]
[TD]Agent[/TD]
[TD]Week[/TD]
[TD]Time[/TD]
[TD]# of Agents[/TD]
[TD]Start Criteria[/TD]
[TD]Week Criteria[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]F--MTWR[/TD]
[TD]6:30 AM[/TD]
[TD] 7[/TD]
[TD]6:30 AM[/TD]
[TD]F--MTWR[/TD]
[/TR]
[TR]
[TD]Jack[/TD]
[TD]F--MTWR[/TD]
[TD]6:30 AM[/TD]
[TD] 0[/TD]
[TD]6:45 AM[/TD]
[TD]--SMTWR[/TD]
[/TR]
[TR]
[TD]Bill[/TD]
[TD]F--MTWR[/TD]
[TD]6:30 AM[/TD]
[TD][/TD]
[TD]7:00 AM[/TD]
[TD]FY--TWR[/TD]
[/TR]
[TR]
[TD]Sam[/TD]
[TD]FY--TWR[/TD]
[TD]6:30 AM[/TD]
[TD][/TD]
[TD]7:30 AM[/TD]
[TD]-YSMTW-[/TD]
[/TR]
[TR]
[TD]Susan[/TD]
[TD]FYSMT--[/TD]
[TD]6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