Thread: time formula
View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.misc
SteveW SteveW is offline
external usenet poster
 
Posts: 427
Default time formula

It works, because you are adding in an extra 24 hours (1 day) if the
sign ooff time is a day later than the sign on time.
You have to give Excel some chance of understanding the values that you
have
entered.

A different way would be to to enter the sign on date+time
and the sign off+time, but this is cumbersome and so you need
to adjust the simple b1-a1 formula to cover the situation when sign off is
the
next day.

Stev



On Sun, 24 Dec 2006 08:44:00 -0000, crusty53
wrote:

Beautiful,because i still dont understand these things properly YET
i have to try all of them and yours works great ,even in the empty cells
:-)

"T. Valko" wrote:

=IF(B1A1,B1-A1,B1+1-A1)


If there's nothing in either cell (cells are empty) the formula should
return 1, not an error. So, that tells me that the cells really aren't
empty.

The formula I posted accounts for *empty* cells.

Biff

"crusty53" wrote in message
...
Gary this works great ,but when there is nothing in the columns then

it
gives
a value error how do i get rid of this please.

"Gary''s Student" wrote:

In C1 enter:
=IF(B1A1,B1-A1,B1+1-A1)
and copy down. you should see:

16:00 0:30 8:30
15:43 23:49 8:06
13:55 0:01 10:06


We need B1+1 to push the time ahead to the next day (+24 hours)
--
Gary's Student


"crusty53" wrote:

i have problems getting correct time.
A B C
1 16:00 00:30
2 15:43 23:49
3 13:55 00:01
In column C i want the time between A & B. But it keeps giving me
15:30
and it should be 8:30 Can anybody help.
The formula i am using is (B1-A1)
A is sign on time
B is sign off time