matthewlrx
New Member
- Joined
- Jul 4, 2022
- Messages
- 16
- Office Version
- 2021
- Platform
- Windows
Hi Everybody
So I have agents who work shifts and I am trying to find a formula which will find the earliest login time and the latest login time. Sounds easy right? Wrong... I have agents (Agent4 as example) who work overtime and go past midnight so their "Logoff" date is the next date but the formula i use sees this as their current login time. If the agents dont work past midnight this formula works great, but if they work after midnight things dont work well.
Here is the formula I am using for Login:
Here is the formula I am using for Logout:
Here is what my data looks like:
Here is what my current formulas pick up. Agent 1 and 2 are fine, Agent 3 and 4 have issues.
Agent3's logout time should be 0:08
Agent4's Login time should be 15:00. The Login 0:15 is when they did overtime at midnight previous shift. Their Logout time should also then be 0:00:07. This person logged in and out twice in their shift due to system issues.
Does anybody have a idea what i can do to get this working?
So I have agents who work shifts and I am trying to find a formula which will find the earliest login time and the latest login time. Sounds easy right? Wrong... I have agents (Agent4 as example) who work overtime and go past midnight so their "Logoff" date is the next date but the formula i use sees this as their current login time. If the agents dont work past midnight this formula works great, but if they work after midnight things dont work well.
Here is the formula I am using for Login:
Excel Formula:
{=IF(COUNTIF(HoursData!H:H,B3)=0,"Absent",MIN(IF(Table2[Agent Name (First Last)]=B3,Table2[Online Time])))}
Here is the formula I am using for Logout:
Excel Formula:
{=IF(R2="Absent","",MAX(IF(Table2[Agent Name (First Last)]=B2,Table2[Offline Time])))}
Here is what my data looks like:
Here is what my current formulas pick up. Agent 1 and 2 are fine, Agent 3 and 4 have issues.
Agent3's logout time should be 0:08
Agent4's Login time should be 15:00. The Login 0:15 is when they did overtime at midnight previous shift. Their Logout time should also then be 0:00:07. This person logged in and out twice in their shift due to system issues.
Does anybody have a idea what i can do to get this working?