Computing Last Logout vs Next Login

kyoyacchi

New Member
Joined
Dec 18, 2020
Messages
1
Platform
  1. Windows
Hi guys. Hopefully you could help me complete what I want to achieve.

I have 3 columns A:C

A = Employee Name
B = Timestamp (Date&Time)
C = In/Out

Example:
File-Copy-icon.png

Agent 1 12/18/2020 7:08:04 AGENT_STATUS/LOGGED_IN
Agent 2 12/18/2020 7:10:47 AGENT_AVAILABILITY/UPDATED
Agent 2 12/18/2020 7:37:25 AGENT_AVAILABILITY/UPDATED
Agent 2 12/18/2020 7:38:32 AGENT_STATUS/WENT_AWAY
Agent 2 12/18/2020 7:39:12 AGENT_STATUS/LOGGED_OUT
Agent 1 12/18/2020 8:22:51 AGENT_STATUS/WENT_AWAY
Agent 2 12/18/2020 8:33:05 AGENT_STATUS/LOGGED_IN
Agent 2 12/18/2020 8:33:14 AGENT_AVAILABILITY/UPDATED

I would love to see the following:
Column D = All of their Logins
Column E = All of their Logouts
Column F = Duration between their Last Logout vs Next Login

I'm currently using a Google Spreadsheet.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Welcome to MrExcel Message Board.
Try this:
After Insert Formula Press CTRL+SHIFT+ENTER
Change C14 Number format to Custom and write at type: [h]:mm:ss

Book1
ABCD
1NameTimeLineSTATUSIN/OUT
2Agent 1Saturday, December 19, 2020 11:34:29 AMAGENT_STATUSLOGGED_IN
3Agent 2Saturday, December 19, 2020 11:54:29 AMAGENT_AVAILABILITYUPDATED
4Agent 2Saturday, December 19, 2020 12:34:29 PMAGENT_AVAILABILITYUPDATED
5Agent 2Saturday, December 19, 2020 12:54:29 PMAGENT_STATUSWENT_AWAY
6Agent 2Saturday, December 19, 2020 1:24:29 PMAGENT_STATUSLOGGED_OUT
7Agent 1Saturday, December 19, 2020 2:34:29 PMAGENT_STATUSWENT_AWAY
8Agent 2Saturday, December 19, 2020 3:34:29 PMAGENT_STATUSLOGGED_IN
9Agent 2Saturday, December 19, 2020 4:34:29 PMAGENT_AVAILABILITYUPDATED
10
11
12Agent 2LOGGED_OUT1:24:29 PM
13Agent 2LOGGED_IN3:34:29 PM
142:10:00
Sheet1
Cell Formulas
RangeFormula
C12:C13C12=INDEX($A$2:$D$9,MATCH(1,(A12=$A$2:$A$9)*(B12=$D$2:$D$9),0),2)
C14C14=C13-C12
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
If you want to calculate for Specific Date and your Time and Date is in one Cell and your criteria for Date only has date. Use This:

Book1
ABCD
1NameTimeLineSTATUSIN/OUT
2Agent 1Saturday, December 19, 2020 11:34:29 AMAGENT_STATUSLOGGED_IN
3Agent 2Saturday, December 19, 2020 11:54:29 AMAGENT_AVAILABILITYUPDATED
4Agent 2Saturday, December 19, 2020 12:34:29 PMAGENT_AVAILABILITYUPDATED
5Agent 2Saturday, December 19, 2020 12:54:29 PMAGENT_STATUSWENT_AWAY
6Agent 2Saturday, December 19, 2020 1:24:29 PMAGENT_STATUSLOGGED_OUT
7Agent 1Saturday, December 19, 2020 2:34:29 PMAGENT_STATUSWENT_AWAY
8Agent 2Saturday, December 19, 2020 3:34:29 PMAGENT_STATUSLOGGED_IN
9Agent 2Saturday, December 19, 2020 4:34:29 PMAGENT_AVAILABILITYUPDATED
10Agent 1Sunday, December 20, 2020 11:34:29 AMAGENT_STATUSLOGGED_IN
11Agent 2Sunday, December 20, 2020 11:54:29 AMAGENT_AVAILABILITYUPDATED
12Agent 2Sunday, December 20, 2020 12:34:29 PMAGENT_AVAILABILITYUPDATED
13Agent 2Sunday, December 20, 2020 12:54:29 PMAGENT_STATUSWENT_AWAY
14Agent 2Sunday, December 20, 2020 1:24:29 PMAGENT_STATUSLOGGED_OUT
15Agent 1Sunday, December 20, 2020 2:34:29 PMAGENT_STATUSWENT_AWAY
16Agent 2Sunday, December 20, 2020 3:34:29 PMAGENT_STATUSLOGGED_IN
17Agent 2Sunday, December 20, 2020 4:34:29 PMAGENT_AVAILABILITYUPDATED
18
19
20Agent 2LOGGED_OUT1:24:29 PM12/20/2020
21Agent 2LOGGED_IN3:34:29 PM12/20/2020
222:10:00
Sheet1
Cell Formulas
RangeFormula
C20:C21C20=INDEX($A$2:$D$17,MATCH(1,(A20=$A$2:$A$17)*(B20=$D$2:$D$17)*(D20=INT($B$2:$B$17)),0),2)
C22C22=C21-C20
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,561
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top