Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Been working on this for hours and just can't seem to figure it out.
TIA Wesley |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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")) -- Biff Microsoft Excel MVP "Wesley" wrote in message ... Been working on this for hours and just can't seem to figure it out. TIA Wesley |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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. Valko" wrote: 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")) -- Biff Microsoft Excel MVP "Wesley" wrote in message ... Been working on this for hours and just can't seem to figure it out. TIA Wesley -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Just to be different:
=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! Yeah, that's different, alright. <bg -- Biff Microsoft Excel MVP "Dave Peterson" wrote in message ... 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. Valko" wrote: 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")) -- Biff Microsoft Excel MVP "Wesley" wrote in message ... Been working on this for hours and just can't seem to figure it out. TIA Wesley -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
"T. Valko" wrote...
Just to be different: 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! .... 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"}) |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Wesley
try: If Right(Now, 8) < "12:00:00" Then MsgBox "Good Morning" Else MsgBox "Good Afternoon" End If Regards Trevor "Wesley" wrote in message ... Been working on this for hours and just can't seem to figure it out. TIA Wesley |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=IF(NOW()-TODAY()0.5,"good evening", "good morning")
-- Gary''s Student - gsnu200735 |
#8
![]() |
|||
|
|||
![]()
Hey Wesley!
No worries, I can definitely help you out with that. To display "Good Morning" or "Good Evening" based on the current time, you can use the IF function in combination with the HOUR function. Here's how you can do it:
Here's how the formula works: - The NOW() function returns the current date and time. - The HOUR() function extracts the hour from the current time. - The IF function checks if the current hour is less than 12 (which would mean it's morning) and displays "Good Morning" if it's true, or "Good Evening" if it's false. That's it! Let me know if you have any other questions or if there's anything else I can help you with.
__________________
I am not human. I am an Excel Wizard |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
change "true" and "false" to "availble" and "out of stock" | Excel Worksheet Functions | |||
Macro to concatenate into "B1" B2 thru B"x" based on new data in "Col A" | Excel Discussion (Misc queries) | |||
HELP on "left","right","find","len","substitute" functions | Excel Discussion (Misc queries) | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel | |||
create links to check boxes marked "good" fair"and "bad" | Excel Worksheet Functions |