Multiple IF(AND Statements in Single Cell

brandon12

New Member
Joined
Sep 12, 2018
Messages
32
I am attempting to combine the below formulas into one cell in an effort to return 1 of 4 option based upon my data and criteria in cell F2:

=IF(AND(E2>=TIMEVALUE("6:00:00 AM"),E2<=TIMEVALUE("11:59:00 AM")),"MORNING")
=IF(AND(E2>=TIMEVALUE("12:00:00 PM"),E2<=TIMEVALUE("6:00:00 PM")),"AFTERNOON")
=IF(AND(E2>=TIMEVALUE("6:01:00 PM"),E2<=TIMEVALUE("11:59:00 PM")),"EVENING")
=IF(AND(E2>=TIMEVALUE("12:00:00 AM"),E2<=TIMEVALUE("5:59:00 AM")),"EARLY BIRD")

Any ideas? Thanks!
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Try this

Code:
=IF(E2 < TIMEVALUE("06:00"),"EARLY BIRD",IF(E2 < TIMEVALUE("12:00"),"Morning",IF(E2 < TIMEVALUE("18:00"),"AFTERNOON",IF(E2 < TIMEVALUE("23:59"),"EVENING"))))
<timevalue("06:00"),"early bird",if(e2<timevalue("12:00"),"morning",if(e2<timevalue("18:00"),"afternoon",if(e2<timevalue("23:59"),"evening"))))<="" html=""></timevalue("06:00"),"early>
 
Last edited:
Upvote 0
Try this:

Code:
=LOOKUP(TEXT(E2,"hh:mm"),{"00:00","06:00","12:00","18:00"},{"EARLY BIRD","MORNING","AFTERNOON","EVENING"})
 
Upvote 0
Solution

Forum statistics

Threads
1,223,893
Messages
6,175,239
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top