I am trying to evaluate a TIME value (XX:XX) based on where it falls during a range of other times in the table. The other times reflect the begining and end of civil twilight as well as sunrise and sunset. I want the formula to return the text "NIGHT", MORNING CIVIL TWILIGHT", "DAY" or "EVENING CIVIL TWILIGHT", depending on it's proximity to the other dates.
Example times in table:
MCT Sunrise Sunset ECT
5:18 5:44 19:08 19:35
Desired Result:
- Times equal to or after Midnight and before 5:18 will produce "NIGHT"
- Times equal to or after 5:18 and before 5:44 will produce "MORNING CIVIL TWILIGHT"
- Times equal to or after 5:44 and before 19:08 will produce "DAY"
- Times equal to or after 19:08 and before 19:35 will produce "EVENING CIVIL TWILIGHT"
- Times equal to or after 19:35 and before Midnight will prodice "NIGHT"
Any thoughts?
Bookmarks