View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bernard Liengme Bernard Liengme is offline
external usenet poster
 
Posts: 4,393
Default Conditional maybe IF question

I am not sure how 'evening' is defined but MOD(F1,1) returns the time as a
fraction of a day.
I chose 6:00 PM as start of evening and used
=IF(MOD(F1,1)<0.5,"Morning",IF(MOD(F1,1)<0.75,"Aft ernoon","Evening"))
or
=IF(MOD(F1,1)<TIME(12,0,0),"Morning",IF(MOD(F1,1)< TIME(18,0,0),"Afternoon","Evening"))
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Zsolt Szabó" wrote in message
...
Hey, how you doing everybody!
In the F1 cell I have =NOW() with cell format *1:30:55 PM . Is it possible
this cell or a different cell with IF can show (display) me somehow
"morning"
, "afternoon" , "evening" etc.
--
Many thanks for your help in advance. Have a wonderful day!
Zsolt