Determine if calculation between 2 date time values is 72 Hours in excel

0 votes

In order to establish a flag against each record when the time difference is smaller than 72 hours, I'm comparing booked DateTime values between two appointments.

It is straightforward to determine the difference in hours using the formula: Setting the cell format to [h]:mm after entering =B1-=A1

To determine whether the calculated amount is less than or larger than 72 hours, I then attempted to utilize an IF statement in a separate column. 

=IF(C1<72:00:00,1,0)

This, and variations of it using double quotes, etc hasn't worked for me. I guess the problem is that the calculated value in column C is still in DateTime format. Can anyone please advise the correct syntax to make the IF statement work?

Nov 12, 2022 in Others by Kithuzzz
• 38,010 points
717 views

1 answer to this question.

0 votes
Actually, Excel is quite accommodating in this regard. The important thing to remember is that date, time, and differences are expressed in decimals, with the full piece representing the number of days and the decimal representing the fractional days (hours, minutes).

So - for your example - after doing the subtraction, you should flag that particular field with =C1 < 3 ==> TRUE (if less than 72 hours), FALSE (otherwise)
answered Nov 12, 2022 by narikkadan
• 63,720 points

Related Questions In Others

0 votes
1 answer

Excel formula to get certain cell if the value is between 2 numbers

So, first with vlookup(): A formula so you ...READ MORE

answered Feb 11, 2023 in Others by Kithuzzz
• 38,010 points
882 views
0 votes
1 answer

Is there a way to produce a sum according to date/time stamp values of another column on excel?

Assuming the input data for the second ...READ MORE

answered Mar 25, 2023 in Others by narikkadan
• 63,720 points
456 views
+1 vote
1 answer

Between cyber security and CCNA profession which one is best in terms of time to become an expert and salary payment

CCNA professional is more inclined towards the ...READ MORE

answered Dec 18, 2019 in Others by Pri
1,873 views
0 votes
1 answer

Average TIME Calculation differs between Excel and PowerBI

They are calculating different things. In Power ...READ MORE

answered Sep 21, 2022 in Others by narikkadan
• 63,720 points
2,994 views
0 votes
0 answers

MS Excel - SumProduct formula with Loop

1 I have 4 arrays of data where ...READ MORE

Feb 18, 2022 in Others by Edureka
• 13,670 points
320 views
0 votes
1 answer