Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I'm setting up a shift roster and need to determine whether a given time is
between the start time and end time of a shift where the shift runs across 2 calendar days eg start 23:00 finish 06:00 would appreciate any help - it's driving me mad |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Assuming start time is in $1$1 and end time in $B$1, ant time to test in D1,
enter formula: =AND(D1+(D1<$A$1)=A$1,D1+(D1<$A$1)<=$B$1+($B$1<$A $1)) which you can drag down The formula adds 1 day to times below start time. HTH -- AP "RamOst" a écrit dans le message de news: ... I'm setting up a shift roster and need to determine whether a given time is between the start time and end time of a shift where the shift runs across 2 calendar days eg start 23:00 finish 06:00 would appreciate any help - it's driving me mad |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi
=EndTime-StartTime+(AndTime<StartTime) Replace EndTime/StartTime with cell references to times in valid time format. (The wormula works when time difference remains less than 24 hours) -- Arvi Laanemets ( My real mail address: arvi.laanemets<attarkon.ee ) "RamOst" wrote in message ... I'm setting up a shift roster and need to determine whether a given time is between the start time and end time of a shift where the shift runs across 2 calendar days eg start 23:00 finish 06:00 would appreciate any help - it's driving me mad |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
So much simpler!!!
"Arvi Laanemets" a écrit dans le message de news: ... Hi =EndTime-StartTime+(AndTime<StartTime) Replace EndTime/StartTime with cell references to times in valid time format. (The wormula works when time difference remains less than 24 hours) -- Arvi Laanemets ( My real mail address: arvi.laanemets<attarkon.ee ) "RamOst" wrote in message ... I'm setting up a shift roster and need to determine whether a given time is between the start time and end time of a shift where the shift runs across 2 calendar days eg start 23:00 finish 06:00 would appreciate any help - it's driving me mad |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Arvi,
I loved your solution, but it does not answer the OP's question. It only gives an interval duration Cheers, -- AP "Arvi Laanemets" a écrit dans le message de news: ... Hi =EndTime-StartTime+(AndTime<StartTime) Replace EndTime/StartTime with cell references to times in valid time format. (The wormula works when time difference remains less than 24 hours) -- Arvi Laanemets ( My real mail address: arvi.laanemets<attarkon.ee ) "RamOst" wrote in message ... I'm setting up a shift roster and need to determine whether a given time is between the start time and end time of a shift where the shift runs across 2 calendar days eg start 23:00 finish 06:00 would appreciate any help - it's driving me mad |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi
Some modifications: =OR(AND(C2=A2,C2<=B2,B2A2),AND(OR(C2=A2,C2<=B2) ,A2B2)) =(1=((C2=A2)*(C2<=B2)*(B2A2)+((C2=A2)+(C2<=B2)) *(A2B2))) =AND(((C2=A2)*(C2<=B2)*(B2A2)+((C2=A2)+(C2<=B2) )*(A2B2))) -- Arvi Laanemets ( My real mail address: arvi.laanemets<attarkon.ee ) "Arvi Laanemets" wrote in message ... Hi With StartTime in A2 and EndTime in B2: =OR(AND(C2=A2,C2<=B2,B2A2),AND(C2=A2,A2B2),AND (C2<B2,A2B2)) -- Arvi Laanemets ( My real mail address: arvi.laanemets<attarkon.ee ) "Ardus Petus" wrote in message ... Arvi, I loved your solution, but it does not answer the OP's question. It only gives an interval duration Cheers, -- AP "Arvi Laanemets" a écrit dans le message de news: ... Hi =EndTime-StartTime+(AndTime<StartTime) Replace EndTime/StartTime with cell references to times in valid time format. (The wormula works when time difference remains less than 24 hours) -- Arvi Laanemets ( My real mail address: arvi.laanemets<attarkon.ee ) "RamOst" wrote in message ... I'm setting up a shift roster and need to determine whether a given time is between the start time and end time of a shift where the shift runs across 2 calendar days eg start 23:00 finish 06:00 would appreciate any help - it's driving me mad |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
This time, my formula is shorter and clearer:
=AND(D1+(D1<$A$1)=A$1,D1+(D1<$A$1)<=$B$1+($B$1<$A $1)) -- AP "Arvi Laanemets" a écrit dans le message de news: ... Hi Some modifications: =OR(AND(C2=A2,C2<=B2,B2A2),AND(OR(C2=A2,C2<=B2) ,A2B2)) =(1=((C2=A2)*(C2<=B2)*(B2A2)+((C2=A2)+(C2<=B2)) *(A2B2))) =AND(((C2=A2)*(C2<=B2)*(B2A2)+((C2=A2)+(C2<=B2) )*(A2B2))) -- Arvi Laanemets ( My real mail address: arvi.laanemets<attarkon.ee ) "Arvi Laanemets" wrote in message ... Hi With StartTime in A2 and EndTime in B2: =OR(AND(C2=A2,C2<=B2,B2A2),AND(C2=A2,A2B2),AND (C2<B2,A2B2)) -- Arvi Laanemets ( My real mail address: arvi.laanemets<attarkon.ee ) "Ardus Petus" wrote in message ... Arvi, I loved your solution, but it does not answer the OP's question. It only gives an interval duration Cheers, -- AP "Arvi Laanemets" a écrit dans le message de news: ... Hi =EndTime-StartTime+(AndTime<StartTime) Replace EndTime/StartTime with cell references to times in valid time format. (The wormula works when time difference remains less than 24 hours) -- Arvi Laanemets ( My real mail address: arvi.laanemets<attarkon.ee ) "RamOst" wrote in message ... I'm setting up a shift roster and need to determine whether a given time is between the start time and end time of a shift where the shift runs across 2 calendar days eg start 23:00 finish 06:00 would appreciate any help - it's driving me mad |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Time calculations and additional 24 hour days | Excel Worksheet Functions | |||
Calculating days & time left from start date/time to end date/time | Excel Worksheet Functions | |||
need help with formula | Excel Discussion (Misc queries) | |||
CONVERTING TIME (DAYS) TO ONTHS,YEARS, ETC. | Excel Worksheet Functions | |||
Macros in excel 2000 | Excel Discussion (Misc queries) |