Timesheet calculations

N

Nansi K.

Hi folks-I'm a newbie here, so forgive me if my question is not so bright....
I am creating a timesheet for an operation that has staff possibly working
from one calendar date through to another on overtime. I have employed an
absolute function with the dates and times to accurately determine the number
of hours (this all works very well). Now, I am at a loss as how to get the
result to display as "8" in the regular hours column and the remaining hours
(anything over 8) to display in the next column. I have used the greater
than and if functions before, but I'm puzzled how to do this in the absolute
calculation. If I make any sense, thanks much for your help!
 
J

Joel

If hours are in A1 and are 12 hours

regular hours in B1 would be

if(a1 <= 8,A1,8)

in C1 Overrtime would be

if(a1 <= 8, 0, A1 - 8)


Absolute would not make any difference

for B1
if(abs(Endtime - Starttime) < 8, A1,8)

for C1
if(abs(Endtime - Starttime) <= 8, 0, A1 - 8)
 
N

Nansi K.

Thank Joel-I should have known!
Nansi

Joel said:
If hours are in A1 and are 12 hours

regular hours in B1 would be

if(a1 <= 8,A1,8)

in C1 Overrtime would be

if(a1 <= 8, 0, A1 - 8)


Absolute would not make any difference

for B1
if(abs(Endtime - Starttime) < 8, A1,8)

for C1
if(abs(Endtime - Starttime) <= 8, 0, A1 - 8)
 

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