mathomas45
New Member
- Joined
- Mar 5, 2018
- Messages
- 3
[FONT="]Hello - [/FONT]
[FONT="]I have a situation which requires me to isolate three separate time periods and return different results.[/FONT]
[FONT="]If the time is >= Midnight (oo
o
o), but less than 8:00 AM - I need to return the result "Midnight"[/FONT]
[FONT="]If the time is >= 8:00 AM, but less than 16:00 (4:00 PM) - I need to return the result "Day"[/FONT]
[FONT="]If the time is >=16:00, but less than midnight (00:00:00) - I need to return the result "Afternoon"[/FONT]
[FONT="]I tried the following formula, but I get the "Problem with this formula" error message from Excel[/FONT]
[FONT="]=IF(AND(F3>=TIME(0,0,0);F3<TIME(8,0,0),"Midnight",IF(AND(F3>=TIME(16,0,0);F3<TIME(0,0,0),"Afternoon","Day"))))[/FONT]
[FONT="]Any suggestions from all you Excel guru's out there.....[/FONT]
[FONT="]I have a situation which requires me to isolate three separate time periods and return different results.[/FONT]
[FONT="]If the time is >= Midnight (oo


[FONT="]If the time is >= 8:00 AM, but less than 16:00 (4:00 PM) - I need to return the result "Day"[/FONT]
[FONT="]If the time is >=16:00, but less than midnight (00:00:00) - I need to return the result "Afternoon"[/FONT]
[FONT="]I tried the following formula, but I get the "Problem with this formula" error message from Excel[/FONT]
[FONT="]=IF(AND(F3>=TIME(0,0,0);F3<TIME(8,0,0),"Midnight",IF(AND(F3>=TIME(16,0,0);F3<TIME(0,0,0),"Afternoon","Day"))))[/FONT]
[FONT="]Any suggestions from all you Excel guru's out there.....[/FONT]