Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Conditional maybe IF question

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
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



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Conditional maybe IF question

Zsolt

It is possible but..........

Define the time ranges for morning, afternoon and evening.


Gord Dibben MS Excel MVP

On Sun, 10 Dec 2006 12:28:01 -0800, Zsolt Szabó
wrote:

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.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,173
Default Conditional maybe IF question

Zsolt

Depends when you see evening starting, but this takes <=midday=morning,
<=4:00pm=Afternoon, after 4:00pm = evening

=IF(MOD(NOW(),1)<=0.5,"Morning",IF(MOD(NOW(),1)<=0 .6666666,"Afternoon","Evening"))

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional format question Richard Excel Discussion (Misc queries) 6 September 30th 06 01:19 AM
YACFQ - Yet Another Conditional Formatting Question... Pheasant Plucker® Excel Discussion (Misc queries) 16 March 22nd 06 05:02 AM
Another Conditional Formating Question RalphSE Excel Worksheet Functions 2 March 16th 06 07:05 PM
Conditional formatting, simple question... Kelly Excel Worksheet Functions 2 March 1st 06 07:31 PM
conditional formatting question Deb Excel Discussion (Misc queries) 0 March 23rd 05 02:07 AM


All times are GMT +1. The time now is 11:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"