Elapsed time showing as ####

NY_excel

New Member
Joined
Apr 3, 2017
Messages
11
Hello,

I am using the following formula to compute elapsed time. When the elapsed time is within the same day (i.e.; start time is 4/3/2017 10:00 AM and end time is 4/3/2017 1:00 PM) it is producing a negative number which displays as #######. This is strange since the formula works fine when the elapsed time spans different days. Any suggestions? Thank you!!

=F13161-E13161-((INT(F13161)-INT(E13161))-NETWORKDAYS(E13161+1,F13161))-(COUNTIF(HolidayList,">="&E13161)-COUNTIF(HolidayList,">"&F13161))
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
When the time went onto the other day, I would use this formula.

However, in my case it only went ahead by a day.

=F13161-E13161+1
 
Upvote 0
*AB
Start TimeEnd time
**
**
without adding 1
**
after adding 1

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:134px;"><col style="width:134px;"></colgroup><tbody>
[TD="bgcolor: #cacaca, align: center"]1[/TD]

[TD="bgcolor: #cacaca, align: center"]2[/TD]
[TD="align: right"]22:00:00[/TD]
[TD="align: right"]01:00:00[/TD]

[TD="bgcolor: #cacaca, align: center"]3[/TD]

[TD="bgcolor: #cacaca, align: center"]4[/TD]

[TD="bgcolor: #cacaca, align: center"]5[/TD]

[TD="align: right"]##################[/TD]

[TD="bgcolor: #cacaca, align: center"]6[/TD]

[TD="bgcolor: #cacaca, align: center"]7[/TD]

[TD="align: right"]03:00:00[/TD]

</tbody>

Spreadsheet Formulas
CellFormula
B5=B2-A2
B7=B2-A2+1

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Last edited:
Upvote 0
Thanks for that. When I try removing the one and the formula doesn't go into the next day then it gives me 26:47 which isn't right.
 
Upvote 0
Yes - difference in hours between the two dates / times factoring out weekends and holidays. I have the holidays listed on a separate list. I got the formula from another forum so if you have another way I could write the formula that would work better I would definitely be interested! Thank you!
Is this what you need?

=MOD(F13161-E13161,1)+NETWORKDAYS(E13161,F13161,HolidayList)-1
 
Upvote 0

Forum statistics

Threads
1,223,268
Messages
6,171,100
Members
452,379
Latest member
IainTru

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