if a time is between certain hours and to return a result of Business hours or After hours

wcngu1

Board Regular
Joined
Dec 3, 2013
Messages
51
Hi guys!

Basically am trying to work out how to make a formula that automatically calculate if a timestamp lands between the hours of 7:30am and 4pm.

If it falls between 7:30am and 4pm I'm hoping for Status to say Business hours, If it falls between 4pm and 7:30am I'm hoping it says After hours but it just says afterhours for everything at the moment =/

This is the spreadsheet (press download on top right) https://drive.google.com/file/d/1UF5tjhja9CUk6yShcUHfURre1ER28cyW/view?usp=sharing

I have tried a few formulas with no success. e.g. =IF(AND(B2>E2,B2<F2),"TRUE","FALSE")


Any help appreciated, I'm pretty rusty with excel after a long stint away from it.

Cheers!
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
You need to convert the date/ time to just time for the comparison so taking your formula you can change it to:

=IF(AND(MOD(B2,1)>$E$2,MOD(B2,1) < $F$2),"Business Hours","After Hours")
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,219
Members
452,619
Latest member
Shiv1198

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