date and time stamp between two other date and time stamps

qwerty78

New Member
Joined
Jun 4, 2019
Messages
3
Hi,

im trying to build a formula that can check a date and time stamp is between two other calculated date and time stamps.
If this was a value issue I would use a IF statement e.g. answer 10 between 5 and 20 =IF(and(a1<=5,a1>=20,"Yes","No")

But when it comes to date and time stamps I want to aid thelogic by using the date and time stamp to give me the partial upper and lowerrange date and then add the time. Ive tried to concatenate but the value never works.
I know that INT can give me the date but how do I code theformula to start at the lower point of 8:00:00 am and the upper of 18:00:00

Example if A1 has a calculated date and time stamp I needthe formula in B1 to say “yes” or “no” if A1 is between the lower or uppertimes
A1=01/07/2019 9:00:00 AM
B1=IF(


 

Marcelo Branco

MrExcel MVP
Joined
Aug 23, 2010
Messages
16,305
Welcome to Mr Excel forum,

Could you provide examples along with expected results?

By the way, to check if 10 is between 5 and 20 you should use
=IF(AND(A1>=5,A1<=20),"Yes","No")

M.
 

Forum statistics

Threads
1,078,365
Messages
5,339,765
Members
399,322
Latest member
jpalleyne

Some videos you may like

This Week's Hot Topics

Top