SOLVED

Calculate value if value greater than 20:00:00 hours

Copper Contributor

Hi guys,

 

I need to know alls days that have hour registered in range 20:00:00 hours to 22:00:00 hours  or equal 

Example: If the value are in this range like 21:01:10 it's true 

 

I have this function but just for one value : 

 

=IF(C2>$Q$2;"True";"False")

 

In cell Q2 i have the 20:00:00 hour VALUE

In cell C2: i have the hours 

 

Collumns; 

Antonio_Savage11_0-1646768088014.png

 

 

How can i calculate in a range 20:00:00 hours to 22:00:00 hours or 8pm to 10 pm

 

Thanks for all help guys 

 

best regards

 

4 Replies
best response confirmed by Antonio_Savage11 (Copper Contributor)
Solution

@Antonio_Savage11 

=IF(AND(C2>=$Q$2,C2<=$Q$2+1/12),TRUE,FALSE)

Maybe with this formula. 

@Antonio_Savage11 

For example:

 

=IF(OR(HOUR(C2)={20;21});"True";"False")

 

or even

 

OR(HOUR(C2)={20;21})

Thank you sir, and if i want to add in function if the days is saturday count all hours to 22:00:00 ? but the other days keep counting 20:00:00 to 22:00:00 its possible?

@Antonio_Savage11 

Does C2 contain the date and time? If so:

=IF(WEEKDAY(C2)=7,HOUR(C2)<22,OR(HOUR(C2)={20,21}))

If the date is in another cell, say in B2:

=IF(WEEKDAY(B2)=7,HOUR(C2)<22,OR(HOUR(C2)={20,21}))

1 best response

Accepted Solutions
best response confirmed by Antonio_Savage11 (Copper Contributor)
Solution

@Antonio_Savage11 

=IF(AND(C2>=$Q$2,C2<=$Q$2+1/12),TRUE,FALSE)

Maybe with this formula. 

View solution in original post