PDA

View Full Version : Solved: easy time formula



neditheg
10-25-2010, 07:31 AM
hello,

what formula I need to use If :

A2=18:00 (for example 18:00 of 24/10/2010)
B2= 01:00 (01:00 of 25/10/2010)

and I want B2-A2=07:00

thanks!!

mbarron
10-25-2010, 09:07 AM
If you want to be able to use the result in other formulas, use a custom cell format of hh:mm;@

If you only want to display the result, as a string and not a time, you can use:

=TEXT(B2-A2,"hh:mm")

neditheg
10-25-2010, 03:01 PM
note this :) so operator A log in at 18:00 ...and hewill log off at 01:00 AM the next day... so he stays at work 7 hours... A2=18:00 ... B2=01:00 ... and in c2 i want a formula wich result should be 07:00.

mbarron
10-25-2010, 03:26 PM
Try this formula:
=IF(B2-A2<0,1+(B2-A2),B2-A2)

Bob Phillips
10-25-2010, 03:45 PM
Try this formula:
=IF(B2-A2<0,1+(B2-A2),B2-A2)

=MOD(B2-A2,1)

neditheg
10-26-2010, 05:31 AM
thanks guys!!

have a nice day!