hiCan anyone suggest a formula to calculat the time difference, this is to check whether the processing is completed within 48 hours.

Data is as below:

Col A Col B Col C Col D

Enque Date Enque Time Deque Date Deque time

10/1/2012 1:50:52 AM 10/4/2012 11:54:21 PMI'm looking for a formula to calculate the time hour difference from Col A and B to Col C and D.

Thank you

First, a posting tip: Before posting example data in this forum, please click on the

blue lineat the end of this post and read the instructions found via that link.As for your question, assuming that your data is in Row 2, this should work:

=IF((C2-A2)*24+D2-B2<48,"Less than 48 hours","More than 48 hours")

It first determines the difference between your Date cells in hours via (C2-A2)*24, then adds to that the difference between your times via D2-B2 to get the total elapsed time in hours. If D2-B2 is negative, it will be subtracted from (C2-A2)*24.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Ask Your Question

Weekly Poll

Would you ride in a self-driving car from Tesla?

Discuss in The Lounge

Poll History