 Thanks:  0 Likes:  0

# Thread: Calculating time between 2 entries

1. ## I have a column that has a date/time format of dd/mm/yy hhmm. I need to calculate the amount of hours and minutes (x:xx) between certain entries in the column. Is there any way to do this? I can send a sample if that would make it easier.

Thanks,  Reply With Quote

2. ## Use =ABS(A1-A2) where cells A1 and A2 contain date values. Format the cell containing this formula as [h]:mm  Reply With Quote

3. ## On 2002-03-06 07:30, dcecil wrote:
I have a column that has a date/time format of dd/mm/yy hhmm. I need to calculate the amount of hours and minutes (x:xx) between certain entries in the column. Is there any way to do this? I can send a sample if that would make it easier.

Thanks,
Just subtract one value from the other and format your result as [h]:mm (e.g., =B1-A1).

Regards,  Reply With Quote

4. ## Sorry guys, but both of the solutions that were given, return an error (\$VALUE!). I think the date in the beginning of the field is messing it up. The fields looks like this: 3/6/02 0900 and 3/6/02 1515, which would return a value of 6:15. Hope this helps.

Thanks,  Reply With Quote

5. ## On 2002-03-06 07:52, dcecil wrote:
Sorry guys, but both of the solutions that were given, return an error (\$VALUE!). I think the date in the beginning of the field is messing it up. The fields looks like this: 3/6/02 0900 and 3/6/02 1515, which would return a value of 6:15. Hope this helps.

Thanks,
So your data is actually being read by Excel as a text value? Do you ever have the times span across a day (e.g., 3/6/02 0900 in one cell and 3/7/02 0300 in another)?  Reply With Quote

6. ## Yes I do.  Reply With Quote

7. ## Okay, assuming your higher date/time is in cell B1 and the lower one is in cell A1, try this formula:

=TIMEVALUE(LEFT(B1,LEN(B1)-2)&":"&RIGHT(B1))-TIMEVALUE(LEFT(A1,LEN(A1)-2)&":"&RIGHT(A1))+DATEVALUE(LEFT(B1,LEN(B1)-2)&":"&RIGHT(B1))-DATEVALUE(LEFT(A1,LEN(A1)-2)&":"&RIGHT(A1))

NOTE - this formula assumes the format of your times is always the same. That is, the last two characters always represents minutes.

Regards,  Reply With Quote

## User Tag List

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•