Plese help folmula required

Jranchhod

Board Regular
Joined
Feb 9, 2009
Messages
56
Hi, I have a table of data with clock times in and out of around 60 staff who use their cards to open the door. the staff can go in and out as many times as they need to. I need to calculate per person the difference of the persons first entry and last exit. thank you in advance
Date
Time
Person
position
01-Feb-14
08:01
a
In
01-Feb-14
08:08
b
In
01-Feb-14
16:01
a
Out
01-Feb-14
16:02
b
Out
02-Feb-14
08:02
c
In
02-Feb-14
08:03
d
In
02-Feb-14
16:30
c
Out
02-Feb-14
16:31
d
Out
03-Feb-14
08:05
e
In
03-Feb-14
08:06
f
In
03-Feb-14
16:40
e
Out
03-Feb-14
16:45
f
Out

<tbody>
</tbody>
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Couple of questions;

Does a person enter only once a day?
Does a person only appear on one day? (i.e. a only appears on 1-feb-14)
 
Upvote 0
in E1
=SUMPRODUCT((C1=C$1:C$12)*(A1=A$1:A$12)*(D$1:D$12="In")*(B$1:B$12))
and copy down

in F1
=SUMPRODUCT((C1=C$1:C$12)*(A1=A$1:A$12)*(D$1:D$12="Out")*(B$1:B$12))
and copy down
 
Upvote 0
You can always use a pivot table to display the results:
Min of TimeColumn Labels
1-Feb-142-Feb-143-Feb-14
Row LabelsInOutInOutInOut
a8:01:00 AM4:01:00 PM
b8:08:00 AM4:02:00 PM
c8:02:00 AM4:30:00 PM
d8:03:00 AM4:31:00 PM
e8:05:00 AM4:40:00 PM
f8:06:00 AM4:45:00 PM

<tbody>
</tbody><colgroup><col><col><col><col><col><col><col></colgroup>
You can then add another column subtracting the out time from the in time to get the total time. For the values choose minimum or maximum to get the correct values on the pivot table.
 
Upvote 0

Forum statistics

Threads
1,213,537
Messages
6,114,216
Members
448,554
Latest member
Gleisner2

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