TIME CALCULATION

F

FEVOOO

I HAVE EXCEL SHEET TO CALCULATE TIME FOR WORKING HOURS, USEING FROM TO AND TOTAL TIME AS FOLLOWING:
FROM (A2), TO (B2) , TOTAL (C2)
SHIFT HOURS FROM 06:00AM TO NEXT DAY 06:00AM AS 24HRS FORMAT CELL
THE PROBLEM IS AFTER PASSING 24:00 MIDNIGHT (FROM 01:00AM TO 06:00AM) TOTAL IS NOT SHOWING BECAUSE ITS LESS THAN 24.
PLEASE HELP.
 
Joined
Jul 22, 2012
Messages
8
Reaction score
0
Hi

Start time; A2
End time: B2
You can use the MOD function: =MOD(B2-A2,1)
or
=IF(B2<A2,B2+1,B2)-A2

Format cells as [h]:mm

Kevin
 
J

joeu2004

FEVOOO said:
I HAVE EXCEL SHEET TO CALCULATE TIME FOR WORKING HOURS [....]
FROM (A2), TO (B2) , TOTAL (C2)
SHIFT HOURS FROM 06:00AM TO NEXT DAY 06:00AM AS 24HRS
FORMAT CELL THE PROBLEM IS AFTER PASSING 24:00 MIDNIGHT
(FROM 01:00AM TO 06:00AM) TOTAL IS NOT SHOWING BECAUSE
ITS LESS THAN 24.

First, the format of the cell does not matter.

Second, to avoid the problem with computing negative time, use the following
formula:

=B2-A2+(A2>B2)

formatted as Time or whatever you want.
 
S

Spencer101

FEVOOO;1608199 said:
I HAVE EXCEL SHEET TO CALCULATE TIME FOR WORKING HOURS, USEING FROM T
AND TOTAL TIME AS FOLLOWING:
FROM (A2), TO (B2) , TOTAL (C2)
SHIFT HOURS FROM 06:00AM TO NEXT DAY 06:00AM AS 24HRS FORMAT CELL
THE PROBLEM IS AFTER PASSING 24:00 MIDNIGHT (FROM 01:00AM TO 06:00AM
TOTAL IS NOT SHOWING BECAUSE ITS LESS THAN 24.
PLEASE HELP.

Try this in C2:

*=IF(B2<A2,(B2+1)-A2,B2-A2)
 
F

FEVOOO

FEVOOO said:
I HAVE EXCEL SHEET TO CALCULATE TIME FOR WORKING HOURS
[....]

FROM (A2), TO (B2) , TOTAL (C2)
SHIFT HOURS FROM 06:00AM TO NEXT DAY 06:00AM AS 24HRS
FORMAT CELL THE PROBLEM IS AFTER PASSING 24:00 MIDNIGHT
(FROM 01:00AM TO 06:00AM) TOTAL IS NOT SHOWING BECAUSE
ITS LESS THAN 24.



First, the format of the cell does not matter.



Second, to avoid the problem with computing negative time, use the following

formula:



=B2-A2+(A2>B2)



formatted as Time or whatever you want.

Thank you so muuuuuch, its working perfectly :)
 

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