Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sum Times based on StatusID & EmpID
Hi,
I have a columns for EmpID, StatusID(1 for Login, 2 for Logout) & Times(DateTime Stamp). EmpID StatusID Times Difference ------------------------------------------------------------------------------ 1 1 4/2/07 8:32 AM 1 2 4/2/07 8:33 AM 1 1 4/2/07 8:37 AM 1 2 4/2/07 8:59 AM 1 1 4/2/07 9:11 AM 1 2 4/3/07 9:12 AM 1 2 4/3/07 9:48 AM error 1 1 4/3/07 9:49 AM 1 2 4/3/07 11:02 AM 2 1 4/3/07 6:02 PM 2 2 4/3/07 6:03 PM 2 2 4/3/07 6:04 PM error 2 1 4/3/07 6:22 PM 2 2 4/3/07 6:23 PM 3 2 4/4/07 8:37 AM error 3 2 4/4/07 8:38 AM error 3 2 4/4/07 8:39 AM error 3 2 4/4/07 12:11 PM error 3 1 4/4/07 12:12 PM 3 2 4/4/07 12:17 PM 3 1 4/4/07 12:23 PM 3 2 4/4/07 1:14 PM In the difference column, i need to subtract the last logout from First Login, excluding any errors which may have occurred due to multiple logins or multiple logouts. Please note i need to mark out errors someway, such that for every login (1) there should be a corresponding logout below. Any other extra logins or logouts occuring below should be marked as errors. On another sheet, i want to summarise data. Date EmpID FirstLogin LastLogout Difference ----------------------------------------------------------------------------------------- 4/2/07 1 4/3/07 1 4/3/07 2 4/4/07 3 How to do accomplish this???? Any brainiacs out there who know how to achieve this using worksheet functions or VBA? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Calculate Date and Times (based on Business days) | Excel Discussion (Misc queries) | |||
how to count the number of times text occurs based on condition | Excel Discussion (Misc queries) | |||
Delete rows based upon a range of times | Excel Discussion (Misc queries) | |||
Calculate time worked based on start / end times & working hours | Excel Discussion (Misc queries) | |||
Count the times a value appears in a column based on another value | Excel Worksheet Functions |