Adding times on different worksheets in same file

M

MBC

I am trying to work out the "shift Gap"(Rest time) between two shifts which
are on different worksheets in the same file. Worksheet 17 cell ref AB3
contains my finish
time of 17:00 and worksheet 18 cell ref I10 contains my shift start time of
8:00. The answer is 15 but the formula I am using gives me an answer of 17?.
Can't see where I am going wrong.
=IF('Week 17'!AB3=0,24,IF('Week 17'!AB3>I3,('Week
17'!AB3-I3)*24,24-(I3-'Week 17'!AB3)*24))
 
M

MBC

Thanks Bob that worked however where my start time cell ref I10 is empty it
returns 7 as the answer. Is there any way I can get it to return 24?
 
B

Bob Phillips

Where does I10 come into it? AB3 is the start cell and if that is zero it
returns 24.
 
M

MBC

Sorry Bob I should have said I3.Even then I still get a result of 7 if I3 is
left empty and ideally I would like it to read 24.
 
M

MBC

Thanks Bob, this worked. Much appreciated

Bob Phillips said:
I get 9, but try

=IF('Week 17'!AB3=0,1,MOD(I3-'Week 17'!AB3,1))*24

--
__________________________________
HTH

Bob
 

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