Time Card Show Up Time

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm working on a Time Calculator for work. On the time cards we have two
sets of In and Out on each card. If as an example someone has clocked in at
6:00 and Clocked out at 14:00. That person has worked their 8 hours and as
they start to leave a truck shows up and they decide to clock back in to
unload the truck. (the company pays them 2:00 hours as show up time. I
don't have a problem with people clocking in 2X and out 2X that is fairly
easy ((B4-B3+(B4<B3)+(B6-B5+(B6<B5))))

How can I have the program calculate (B4-B3+(B4<B3)) AND IF B5>0 AND B6<=0
ADD "2:00" BUT IF B5>0 AND B6>0 ADD (B6-B5+(B6<B5)) TO (B4-B3+(B4<B3))
 
Lewis said:
I'm working on a Time Calculator for work. On the time cards we have
two
sets of In and Out on each card. If as an example someone has clocked
in at
6:00 and Clocked out at 14:00. That person has worked their 8 hours and
as
they start to leave a truck shows up and they decide to clock back in
to
unload the truck. (the company pays them 2:00 hours as show up time.
I
don't have a problem with people clocking in 2X and out 2X that is
fairly
easy ((B4-B3+(B4<B3)+(B6-B5+(B6<B5))))

How can I have the program calculate (B4-B3+(B4<B3)) AND IF B5>0 AND
B6<=0
ADD "2:00" BUT IF B5>0 AND B6>0 ADD (B6-B5+(B6<B5)) TO (B4-B3+(B4<B3))

Hi Lewis

Try this:

=IF(AND(B5="",B6=""),(B4-B3+(B4<B3)),IF(AND(B5>0,B6<=0),(B4-B3+(B4<B3)),IF(AND(B5>0,B6>0),(((B4-B3+(B4<B3)+(B6-B5+(B6<B5)+"02:00")))))))
 
Mr. Sheppard,
Thank you for the input. I modified your line to read the following and it
worked. Here is what I had to enter but it will return an error if the
person were to clock back in at 0. This is much better than what I had.

=IF(AND(B5="",B6=""),(B4-B3+(B4<B3)),IF(AND(B5>0,B6>0),((B4-B3+(B4<B3))+(B6-B5+(B6<B5))),IF(AND(B5>0,B6=""),(((B4-B3+(B4<B3)+"02:00"))))))
 

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

Back
Top