IF NOW is between specific timeframes not counting both HOUR and MINUTE - HELP PLS :)

JEH105

New Member
Joined
Oct 11, 2019
Messages
35
Office Version
  1. 365
Platform
  1. Windows
Can anyone assist with figuring out a way to write out this function to where it takes both hour and minutes into consideration when comparing the NOW time?

Details:


This is the formula I have under John Smith 1 row:

Excel Formula:
=IF(AND(HOUR((NOW()))>=HOUR($E14),MINUTE((NOW()))>=MINUTE($E14))+AND(HOUR((NOW()))<=HOUR($F14),MINUTE((NOW()))<=MINUTE($F14)),"Yes","No")

1674143111979.png


FYI:
John Smith = Row 13
John Smith 1 = Row 14
John Smith 2 = Row 15
John Smith 3 = Row 16
John Smith 4 = Row 17
John Smith 5 = Row 18

Issue:


My issue with this formula, is that if the current time is 9:00 am or anytime before the 30 minute mark, it will show as "No", even if it's past 6:30 am. I'm pretty sure it's because of the MINUTE function, but I'm not sure how else to write it.

Any help is truly appreciated! Thank you!
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
How about
Excel Formula:
=IF(AND(TEXT(NOW(),"hh:mm")>=TEXT(E14,"hh:mm"),TEXT(NOW(),"hh:mm")<=TEXT(F14,"hh:mm")),"Yes","No")
 
Upvote 0
How about
Excel Formula:
=IF(AND(TEXT(NOW(),"hh:mm")>=TEXT(E14,"hh:mm"),TEXT(NOW(),"hh:mm")<=TEXT(F14,"hh:mm")),"Yes","No")
Yes! Thank you!

I have one more question. If I wanted the formula to indicate Yes, but only if the timeframe is 1.5 hours before the End Time, do you know how I would do that?

Example:

John Smith 1 ends time at 3:00 pm, I would want the formula to indicate No 1.5 hours before 3:00 pm (1:30 pm).
 
Upvote 0
How about
Excel Formula:
=IF(AND(TEXT(NOW(),"hh:mm")>=TEXT(E14,"hh:mm"),TEXT(NOW(),"hh:mm")<=TEXT(F14-TIME(1,30,0),"hh:mm")),"Yes","No")
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,161
Members
453,021
Latest member
Justyna P

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