
Signature
Regards,
Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings
sandymann2@mailinator.com
Replace @mailinator.com with @tiscali.co.uk
Hi Khad,
Even with a night's sleep I am still having difficulty understanding what it
is that you are trying to do. I guess from:
>> realised when i moved time brackets eg 22:00-05:59 the duty time
that you are having problems when the times cross midnight and you want to
calculate the number of hours from 22:00 to 5:59 the next morning.. If so
then with 22:00 in A1 and 05:59 in B1, try using:
=MOD(B1-A1,1)
This will give you the correct answer whether or not the time does cross
midnight so it can be used for all calculations.
If I am wrong then post back giving as much datail as possible including the
fomulas that you are using and the layout of your data.

Signature
HTH
Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings
sandymann2@mailinator.com
Replace @mailinator.com with @tiscali.co.uk
> Khad,
>
[quoted text clipped - 27 lines]
>>
>> anyway thanks for your help so far
khad - 27 May 2008 12:33 GMT
hi sandy
no the formula i need has nothing to do with crossing midnight. what i need
is a formula that just recognises the differant duty times applicable to the
sectors e.g 06:00-07:59 = 13:00 for 1 sector 12:15 for 2 etc, and this should
refect in the fdp allowed cell, so that when i say have a stanby from
13:00-17:59 4 sectors, the fdp allowed cell should pick up 10:45 10 hrs 45
mins. i was only able to figure out how to tell th fdp allowed cell the
06:00-07:59 duty times and sectors through using this formula
=IF(D29=E9,E10:E18,IF(D29=F9,F10,IF(D29=G9,G10,IF(D29=H9,H10,IF(D29=I9,I10,IF(D29=J9,J10))))))
but couldnt work out how you tell the fdp allowed cell all the other time
blocks and sector duty times.
many thanks for all your time looking at this.
Sandy Mann - 27 May 2008 13:22 GMT
I think that light is beginning to dawn on me:
With your table in A2:I6
A B C D E F G H
2 06:00-07:59 13:00 12:15 11:30 10:45 10:00 09:30 09:00 09:00
3 08:00-12:59 14:00 13:15 12:30 11:45 11:00 10:30 10:00 09:30
4 13:00-17:59 13:00 12:15 11:30 10:45 10:00 09:30 09:00 09:00
5 18:00-21:59 11:15 10:30 09:45 09:30 09:00 09:00 09:00 09:00
6 22:00-05:59 11:00 10:15 09:30 09:00 09:00 09:00 09:00 09:00
With 13:00-17:59 in cell D28 and 4 (for the sectors) in F29 then:
=VLOOKUP(E29,A2:I6,F29+1,FALSE)
will return the 10:45 you are looking for when the cell is formatted as
time. Is this what you are looking for?
If not then, provided you are not using XL2007, you can send me a sample
Workbook to illustrate your problem. Change the part of my address after
the @ sign as it says in my signature.

Signature
HTH
Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings
sandymann2@mailinator.com
Replace @mailinator.com with @tiscali.co.uk
> hi sandy
>
[quoted text clipped - 13 lines]
>
> many thanks for all your time looking at this.
Sandy Mann - 27 May 2008 22:01 GMT
For the archives the VLOOKUP() formula was what was required.

Signature
Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings
sandymann2@mailinator.com
Replace @mailinator.com with @tiscali.co.uk
>I think that light is beginning to dawn on me:
>
[quoted text clipped - 37 lines]
>>
>> many thanks for all your time looking at this.