View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jarek Kujawa[_2_] Jarek Kujawa[_2_] is offline
external usenet poster
 
Posts: 896
Default same time range on different days

MOD(A1,1)?
what an excellent formula it is...
;-)

On 29 Gru, 11:40, "David Biddulph" <groups [at] biddulph.org.uk
wrote:
Perhaps you could clarify something for us, please, Jarek?

Why TIME(HOUR(A1),MINUTE(A1),SECOND(A1)) instead of just MOD(A1,1) ?
--
David Biddulph

"Jarek Kujawa" wrote in message

...



try:


=IF(AND(TIME(HOUR(A1),MINUTE(A1),SECOND(A1))TIME( 7,30,),TIME(HOUR
(A1),MINUTE(A1),SECOND(A1))<TIME(8,30,)),"breakfas t",IF(AND(TIME(HOUR
(A1),MINUTE(A1),SECOND(A1))TIME(11,30,),TIME(HOUR (A1),MINUTE
(A1),SECOND(A1))<TIME(14,0,)),"dinner",IF(AND(TIME (HOUR(A1),MINUTE
(A1),SECOND(A1))TIME(17,0,),TIME(HOUR(A1),MINUTE( A1),SECOND(A1))<TIME
(20,0,)),"dinner",IF(OR(TIME(HOUR(A1),MINUTE(A1),S ECOND(A1))TIME
(23,0,),TIME(HOUR(A1),MINUTE(A1),SECOND(A1))<TIME
(1,0,)),"midnight",""))))


On 29 Gru, 09:36, tmax wrote:
If I have data sets as below (up to 1000 on daily basis), how can I set a
formula that returns:
"breakfast" if the time is between 7:00 and 8:30
"lunch" if the time is between 11:30 and 14:00
"dinner" if the time is between 17:00 and 20:00
and
"midnight" if the time is between 23:00 and 1:00


the date is not important and should not be regarded, what is important
is
the time period.


12/1/08 9:53
12/2/08 9:28
12/2/08 14:49
12/2/08 20:29
12/4/08 9:30
12/4/08 13:21
12/4/08 13:21
12/4/08 13:21
12/5/08 9:13


Thank you very much.
:-)- Ukryj cytowany tekst -


- Pokaż cytowany tekst -