J
Jan G. Thorstensen
Hi.
I am working on a Time sheet where the business is running 24hrs a day.
For working hours from 22:00 hrs until 06:00 is better paid than the other
working hours.
I want theese extra paid hours to show in one separate coloumn and wonder if
someone have a good Formula do to this. Below are some sample data;
StartTime EndTime ElapsedHrs NumOfHrsFrom22To06
06:00 09:00 03:00 00:00
23:00 03:00 04:00 04:00
02:00 09:00 07:00 04:00
19:00 03:00 08:00 05:00
I have tried to use some formula Example from Chip Pearson's site.
This looks like
=(B4-A4+(B4<A4))
This works just fine for the elapsed hours no matter if the Start Time is
later
than the End Time, because the time has passed midnight.
The problem is in the last Column; "NumOfHrsFrom22To06" where I want only
the hours between 22:00 and 06:00. (Or hours between 10PM and 06AM).
I have tried; (OUT=06:00, INN=22:00)
=(STØRST(OUT;MIN(B5;OUT))-STØRST(A5;MIN(A5;INN))+(B5<A5))
and this work if the Start Time is less than the End Time i.e. 02:00 to
09:00 but it does not
work if the Start Time is later than the End Time i.e. 23:00 to 05:00.
A working formula for this purpose would be very much appretiated. Thanks.
Jan
I am working on a Time sheet where the business is running 24hrs a day.
For working hours from 22:00 hrs until 06:00 is better paid than the other
working hours.
I want theese extra paid hours to show in one separate coloumn and wonder if
someone have a good Formula do to this. Below are some sample data;
StartTime EndTime ElapsedHrs NumOfHrsFrom22To06
06:00 09:00 03:00 00:00
23:00 03:00 04:00 04:00
02:00 09:00 07:00 04:00
19:00 03:00 08:00 05:00
I have tried to use some formula Example from Chip Pearson's site.
This looks like
=(B4-A4+(B4<A4))
This works just fine for the elapsed hours no matter if the Start Time is
later
than the End Time, because the time has passed midnight.
The problem is in the last Column; "NumOfHrsFrom22To06" where I want only
the hours between 22:00 and 06:00. (Or hours between 10PM and 06AM).
I have tried; (OUT=06:00, INN=22:00)
=(STØRST(OUT;MIN(B5;OUT))-STØRST(A5;MIN(A5;INN))+(B5<A5))
and this work if the Start Time is less than the End Time i.e. 02:00 to
09:00 but it does not
work if the Start Time is later than the End Time i.e. 23:00 to 05:00.
A working formula for this purpose would be very much appretiated. Thanks.
Jan