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:
- First, open up a new Excel sheet and select the cell where you want to display the greeting.
- In that cell, type the following formula:
Formula:
=IF(HOUR(NOW())<12,"Good Morning","Good Evening")
- Press Enter and you should see the greeting displayed based on the current time.
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.