Hello I am trying to create an IF formula that will display either "Day", "Twilight" or "Night" based on the time of another cell.
- It should display "Day" if Time is between 8am and 5pm. Including 8am.
- It should display "Twilight if Time is between 5pm and 9:30pm. Including 5pm.
- It should display "Night" if Time is between 9:30pm and 8am. Including 9:30pm
So far I have developed this formula:
=IF(N4="","",IF(AND(HOUR(N4)>=8,HOUR(N4)<17),"Day",IF(AND(HOUR(N4)>=17,AND(HOUR(N4)<21,MINUTE(N4)<30)),"Twilight","Night")))
However when I enter 17:41 into N4 it displays Night.
Please help me correct my formula.
Bookmarks