Time calulations

Hydro

New Member
Joined
Dec 16, 2017
Messages
2
I am trying to compute the downtime and have a formula that subtracts the on task time, transit and wait time from 24 hours. However if the sum of the calculation equals 24 hours then I get #####s in the cell; if it equals 00:00:01 then it will display correctly ie 00:00. Is there a way of showing zero downtime as 00:00 when the calculation returns a value of 00:00:00. I have tried different formats of the results cell (hh;mm and [h]:mm) but it makes no difference.
Help appreciated
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
if the sum of the calculation equals 24 hours then I get #####s in the cell; if it equals 00:00:01 then it will display correctly ie 00:00. Is there a way of showing zero downtime as 00:00 when the calculation returns a value of 00:00:00.

It is difficult to say for sure without a concrete example that demonstrates the problem.

I suspect the problem is the result of anomalies with 64-bit binary floating-point values, which is how Excel represents numbers internally, including time. The result of your time arithmetic might be infinitesimally less than zero. To confirm, temporarily format the cell as Scientific. You might see a result of the form -1.23E-14.

To avoid this, if your time formula is of the form =expression, change it to:

=ROUND((expression)*86400,0)/86400

formatted as Custom [h]:mm . That rounds to the second.
 
Upvote 0
Hi

many thanks for the reply. I tested as requested and got -8.9E13. used the round function and it no displays correctly ie 00:00.

much appreciated:)
 
Upvote 0

Forum statistics

Threads
1,214,891
Messages
6,122,105
Members
449,066
Latest member
Andyg666

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top