G Guest Aug 4, 2007 #1 Been working on this for hours and just can't seem to figure it out. TIA Wesley
T T. Valko Aug 4, 2007 #2 Well, it depends on when evening starts. How about this: 12:00 AM to 11:59 AM = Good Morning 12:00 PM to 5:59 PM = Good Afternoon 6:00 PM to 11:59 PM = Good Evening =IF(MOD(NOW(),1)<0.5,"Good Morning",IF(MOD(NOW(),1)<0.75,"Good Afternoon","Good Evening"))
Well, it depends on when evening starts. How about this: 12:00 AM to 11:59 AM = Good Morning 12:00 PM to 5:59 PM = Good Afternoon 6:00 PM to 11:59 PM = Good Evening =IF(MOD(NOW(),1)<0.5,"Good Morning",IF(MOD(NOW(),1)<0.75,"Good Afternoon","Good Evening"))
T Trevor Shuttleworth Aug 4, 2007 #3 Wesley try: If Right(Now, 8) < "12:00:00" Then MsgBox "Good Morning" Else MsgBox "Good Afternoon" End If Regards Trevor
Wesley try: If Right(Now, 8) < "12:00:00" Then MsgBox "Good Morning" Else MsgBox "Good Afternoon" End If Regards Trevor
D Dave Peterson Aug 5, 2007 #5 Just to be different: =IF(NOW()<TIME(12,0,0),"Good Morning", IF(NOW()<TIME(18,0,0),"Good Afternoon","Good Evening")) It might make changing those cutoff times a little easier.
Just to be different: =IF(NOW()<TIME(12,0,0),"Good Morning", IF(NOW()<TIME(18,0,0),"Good Afternoon","Good Evening")) It might make changing those cutoff times a little easier.
T T. Valko Aug 5, 2007 #6 Just to be different: =IF(NOW()<TIME(12,0,0),"Good Morning", IF(NOW()<TIME(18,0,0),"Good Afternoon","Good Evening")) Click to expand... So where you are it's *always* going to be evening! Yeah, that's different, alright. <bg>
Just to be different: =IF(NOW()<TIME(12,0,0),"Good Morning", IF(NOW()<TIME(18,0,0),"Good Afternoon","Good Evening")) Click to expand... So where you are it's *always* going to be evening! Yeah, that's different, alright. <bg>
H Harlan Grove Aug 5, 2007 #7 Let's reformat that for clarity, =IF(NOW()<TIME(12,0,0), "Good Morning", IF(NOW()<TIME(18,0,0), "Good Afternoon", "Good Evening" ) ) So where you are it's *always* going to be evening! Click to expand... .... One of the problems living in a time warp where clocks skip instantly from noon to 6 PM. But folling the cause of differentness, ="Good "&LOOKUP(HOUR(NOW()),{0;12;18;22}, {"Morning";"Afternoon";"Evening";"Night"})
Let's reformat that for clarity, =IF(NOW()<TIME(12,0,0), "Good Morning", IF(NOW()<TIME(18,0,0), "Good Afternoon", "Good Evening" ) ) So where you are it's *always* going to be evening! Click to expand... .... One of the problems living in a time warp where clocks skip instantly from noon to 6 PM. But folling the cause of differentness, ="Good "&LOOKUP(HOUR(NOW()),{0;12;18;22}, {"Morning";"Afternoon";"Evening";"Night"})