Smokeyham
Board Regular
- Joined
- Feb 1, 2006
- Messages
- 120
- Office Version
- 365
- Platform
- Windows
Hello,
I am trying to set up a system in Excel 2007 (running under Windows 7) to calculate a facility's closing time based upon "rules" about Sunset time. Using the very helpful information from exceldir I was able to download the Sunset times, and convert them using the formula =TIME(C8,D8,0).
Now I would like to use those times calculate the closing times based on two rules:
Rule #1
If sunset is between 20 minutes before the hour and 15 minutes after the hour, then set close time at the next ½ hour
Example: Sunset is between 5:40 PM and 6:15 PM then close time is 6:30 PM.
Rule #2
If Sunset is between 16 minutes after the hour and 39 minutes prior to the next hour, then set close time at the next full hour.
Example: Sunset is between 7:16 PM and 7:39 PM then close time is 8:00 PM.
Can anyone tell me a formula which would allow this to be calculated?
Thanks for any help!
I am trying to set up a system in Excel 2007 (running under Windows 7) to calculate a facility's closing time based upon "rules" about Sunset time. Using the very helpful information from exceldir I was able to download the Sunset times, and convert them using the formula =TIME(C8,D8,0).
Now I would like to use those times calculate the closing times based on two rules:
Rule #1
If sunset is between 20 minutes before the hour and 15 minutes after the hour, then set close time at the next ½ hour
Example: Sunset is between 5:40 PM and 6:15 PM then close time is 6:30 PM.
Rule #2
If Sunset is between 16 minutes after the hour and 39 minutes prior to the next hour, then set close time at the next full hour.
Example: Sunset is between 7:16 PM and 7:39 PM then close time is 8:00 PM.
Can anyone tell me a formula which would allow this to be calculated?
Thanks for any help!