# 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

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

#### 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.

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Threads
1,164,651
Messages
5,838,571
Members
430,556
Latest member
Peachforyou

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

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