Thread: time formula
View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.misc
crusty53 crusty53 is offline
external usenet poster
 
Posts: 19
Default time formula

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