=IF formula help

Copper Contributor

I'm looking for a formula that will calculate the time between 2 cells and tell me either YES or NO if its been 24 hours or not. 

 

Example 1

Cell A2 says 11/1/21

Cell B2 says 16:00

Cell C2 says 11/1/21

Cell D2 says 22:00

I want Cell E2 to say "YES" (meaning that it was within 24 hours. Comparing cells A2&B2 vs C2&D2)

 

Example 2

Cell A2 says 11/1/21

Cell B2 says 16:00

Cell C2 says 11/2/21

Cell D2 says 16:30

I want Cell E2 to say "NO" (meaning that it was not within 24 hours because it was the next day)

1 Reply

@BSykes07 

Untested.

=(C2+D2-A2-B2)<1