![]() |
Determining a specific time during the day
Hello
I am trying to write an if statement which can determine a specified time each day. For example If it is before 3:00 pm then A2 = before; If it is after 3:00 pm then A2 = after. Thank you in advance Susan |
You could try:
=IF(HOUR(NOW())<15,"Before","After") Hope this helps Rowan Susan Hayes wrote: Hello I am trying to write an if statement which can determine a specified time each day. For example If it is before 3:00 pm then A2 = before; If it is after 3:00 pm then A2 = after. Thank you in advance Susan |
Hi Susan..........
Rowan's formula works fine, and does exactly what you asked for, but keep in mind, it is a volatile thing. If you are working in the file and at 5 minutes till 3 decide to save and quit, A2 will read "before", but if you open the file again at 5 minutes AFTER 3, A2 will read "after"........NOT the "before" that it read when you saved...........this is ok, as long as this is the way you want it to work..................... Vaya con Dios, Chuck, CABGx3 "Susan Hayes" wrote in message ... Hello I am trying to write an if statement which can determine a specified time each day. For example If it is before 3:00 pm then A2 = before; If it is after 3:00 pm then A2 = after. Thank you in advance Susan |
All times are GMT +1. The time now is 10:04 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com