View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Greeting Function

even simpler:

A1 = =NOW()

="Good
"&IF(MOD(A1,1)<0.5,"Morning",IF(MOD(A1,1)<0.75,"Af ternoon","Evening"))

Biff

"Heather Heritage" wrote in
message ...
surely

=if(now()-int(now())<.5,"Good Morning",if(now()-int(now())<.75,"Good
Afternoon","Good Evening"))

is simpler?!


"SteveG" wrote in
message ...

edward,

I typed in my cut off times in A1:A3 (12:00:00 AM, 12:00:00 PM, 6:00:00
PM respectively).


=IF(AND(TIMEVALUE(TEXT(NOW(),"hh:mm:ss"))=A1,TIME VALUE(TEXT(NOW(),"hh:mm:ss
"))<A2),"Good

Morning",IF(AND(TIMEVALUE(TEXT(NOW(),"hh:mm:ss")) =A2,TIMEVALUE(TEXT(NOW(),"
hh:mm:ss"))<A3),"Good
Afternoon","Good Evening"))

HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile:

http://www.excelforum.com/member.php...fo&userid=7571
View this thread:
http://www.excelforum.com/showthread...hreadid=555043