Timesheet formulas for three in/outs, OT, Holiday, Vac, Sick, tota

K

Kathryn Pundt

I downloaded a timesheet like the one below. I added the extra in/out and
can't seem to get the formulas to work. I used the existing formula and just
added the two new columns.
=IF((((D12-C12)+(F12-E12)+(H12-G12))*24)>8,8,(((D12-C12)+(F12-E12)+(H12-G12))*24))

B C D E F G H I J K
L M N
12 Day In Out In Out In Out Reg Hrs OT Sick Holi Vac Total
13 Sunday 0.00
14 Monday 0.00
15 Tuesday 0.00
16 Wednesday 0.00
17 Thursday 0.00
18 Friday 0.00
19 Saturday 0.00
20
21 Total 0.00 0.00 0.00 0.00 0.00 0.00

Can someone help me figure out what I am doing wrong?
 
T

Toppers

Assuming the mismatch between your formula and rows is typo (row 12 contains
headings), the formula works OK for me. I have the time columns formatted as
hh:mm and Reg Hours as General


OT hours (formatted as General):

=MAX(0,(($D12-$C12)+($F12-$E12)+($H12-$G12))*24-8)

What error do you get?

HTH
 
K

Kathryn Pundt

The timesheet is perfect, except for the fact that now our accounting
department wants the times to be AM/PM, not military. Can we still calculate
the total times and convert the time to AM/PM to comply with the "heads"?
Example: in 8:00 AM / out 12:00 PM / in 1:00 PM, etc.
 
P

Peo Sjoblom

OT hours as AM/PM? Frankly that doesn't make any sense at all, what if you
have 20 hours of OT, are you going to use 08:00 PM? If you mean what you put
into the cells to be calculated like

IN Out
08:00 AM 11:30 AM

and so on, that is just a formatting issue. Just change the format
 
K

Kathryn Pundt

Peo,
The timesheet has the time entered as military (see below email string),
then calculates and converts to 8 in total reg hrs and # for any overtime.
It is the miliary time that is the problem. The way I understand it, to be
able to calculate time, it first must be military (my sheet lets you enter
reg clock time, then converts it to military). What I need it to is not show
it as military time in the timesheet itself, but to calculate it in military
time.

If you can think of a better way or just another way to get what will
satisfy "the heads", please let me know. I worked on this all weekend and
finally gave in and got online and posted my question. What I thought was
going to be easy, turned out to be not so easy for me.
 
P

Peo Sjoblom

Topper's formula deals with regular Excel time, the *24 converts it to
decimal time, to me military time is

800 for 08:00 AM and 2200 for 10:00 PM

is that what you are using?
 
K

Kathryn Pundt

Yes, the formula converts the typed in time to military. I type in 8:00 am,
the formula converts it to 800, but the accounting dept. wants to see 8:00
am. How can we make the formula calculate the time and leave what you see as
8:00 am? I have tried different number settings for the cells, but can't
seem to find the "right" one. If it would make it easier to see what I am
talking about, can I send it to you?
 
P

Peo Sjoblom

Actually his formula converts it to decimal time, not military

=MAX(0,(($D12-$C12)+($F12-$E12)+($H12-$G12))-TIME(8,,))

will return regular excel time and you can format it to your liking


be prepared that 0:00 will be displayed as 12:00 AM


--
Regards,

Peo Sjoblom
 
K

Kathryn Pundt

Okay, I definitely am not communicating this right. Topper told me to change
the cells where I enter time to military because the calculations needed
military to work. The end result is what I want to see - in the columns of
total time, i.e., Reg hrs, OT, etc. It's the time I type in. I type in
8:00 AM, the cell converts it to the format of military. How can I get the
formula to recognize those cells as regular clock time? The formula only
works with military time. Sorry, I know what I am talking about, but it is
hard to convey it.
 
P

Peo Sjoblom

This formula

=MAX(0,(($D12-$C12)+($F12-$E12)+($H12-$G12))*24-8)


assumes that the entries in D12:G12 are entered as regular time

meaning for instance

IN OUT IN OUT

08:00 12:00 12:30 17:30

or the equivalent using AM/PM

His formula formatted as general will return
1 hour OT which is correct if 8 hours is the regular time

Now if you enter that as

8.00 12.00 12.50 17.50

his formula will return 208 hours OT


if you enter it as

800 1200 1230 1730

his formula will return 21592 hours of OT

He is in UK I believe so you might want to wait until he wakes up,
maybe he can shine a light on this



--
Regards,

Peo Sjoblom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top