• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Time duration not displaying correctly

ccarruth

Member
Have a start time and an end time. The start time is in a cell populated by VB code, as is the end time. The start time is on day 1, end time on day 2. When I subtract start from stop I get "*************" even with formatting applied. When I subtract stop from start then I get the wrong value.

I simply need to know how long it took in hours and minutes between start and stop. Any ideas? And no I can't go into the code base..not a programmer.

Chris
 
Kindly upload sample sheet.

Have a start time and an end time. The start time is in a cell populated by VB code, as is the end time. The start time is on day 1, end time on day 2. When I subtract start from stop I get "*************" even with formatting applied. When I subtract stop from start then I get the wrong value.

I simply need to know how long it took in hours and minutes between start and stop. Any ideas? And no I can't go into the code base..not a programmer.

Chris
 
For this to work properly both times must include day information.
When you change the format of both cells to 'General' I suspect you'll only see a value of less than 1 for both values.
Trying to subtract a larger date/time from a smaller date/time will always result in ###########.
Date/time data in excel is held as a nuymber with decimals. Try this:
type
=Now()
into a cell and press Enter. You'll see the current date and time. Format that cell as General and you'll see the likes of
42609.98454
That's 42,609 days since 1/1/1900 (or thereabouts).
 
Back
Top