# Plese help folmula required

#### Jranchhod

##### Board Regular
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

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

#### StefanVL

##### Board Regular
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)

#### Special-K99

##### Well-known Member
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

#### Nembatic

##### New Member
You can always use a pivot table to display the results:
 Min of Time Column Labels 1-Feb-14 2-Feb-14 3-Feb-14 Row Labels In Out In Out In Out a 8:01:00 AM 4:01:00 PM b 8:08:00 AM 4:02:00 PM c 8:02:00 AM 4:30:00 PM d 8:03:00 AM 4:31:00 PM e 8:05:00 AM 4:40:00 PM f 8:06:00 AM 4: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.

Replies
17
Views
136
Replies
1
Views
14
Replies
4
Views
118
Replies
3
Views
36
Replies
4
Views
56

1,109,348
Messages
5,528,185
Members
409,807
Latest member
nicky736

### This Week's Hot Topics

• Change military grades into rank
Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
• VBA COUNTIF SOLUTION
Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
• INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
• VBA vlookup multiple results
Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
• Extract values for earliest/latest times
I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...