Start Time and End time it maybe for 1 day or it maybe for 2 days

T

The_Sleeper

Here is my sheet. I go out Jan 1 @21:00 and get back Jan 2 @09:00 then
the next day out @09:00 and back in @21:00. Is there a way to write a
formula that will do nothing if C2 is empty then go to the next Day
( C3 ) and count the hours for D3? at the same time if i was to go
out and back in like cell B4 on the same day. So i need to have a
formula to work for both in one cell and have it choose which one to
use. Not sure how i would put it. Should i use IF, OR, AND.
this one has me thinking. Who knows it just might be simple. Any
ideas????


A B C D
1 Date Time out Time In Hours
2 Jan-01 21:00
3 Jan-02 9:00 12:00
4 Jan-03 9:00 21:00 12:00
5 Jan-04 12:00
6 Jan-05 10:00 22:00

Thank you
Leo L'Hirondelle
 
B

Bob Phillips

=IF(ROW()=2,"",IF(AND(ISNUMBER(B2),ISNUMBER(C2)),MOD(C2-B2,1),MOD(B2-B1,1)))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

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