Diffrence between two times and give 0 in there is no diffrence instead of #value

z75455

New Member
Joined
Mar 7, 2015
Messages
16
I am calculating the difference between 2 times to calculate the total minutes a project handoff is delayed using =TEXT(D2-C2, "h:mm") and it works.

:confused: Problem is when the project is finished on time or earlier, it gives me an error of #Value .

How can I change the #Value to show 0 if finished early or on time?

Thank you in advance for your help.


Example:
[TABLE="width: 593"]
<tbody>[TR]
[TD]Production Date:
[/TD]
[TD]Department:
[/TD]
[TD]Target Time:
[/TD]
[TD]Released to PSSI:
[/TD]
[TD]Delay Time
[/TD]
[/TR]
[TR]
[TD="align: right"]5/14/2018
[/TD]
[TD]Debone (12:45 AM)
[/TD]
[TD="align: right"]12:45:00 AM
[/TD]
[TD="align: right"]1:00:00 AM
[/TD]
[TD]0:15
[/TD]
[/TR]
[TR]
[TD="align: right"]5/14/2018
[/TD]
[TD]Breading (12:30 AM)
[/TD]
[TD="align: right"]12:30:00 AM
[/TD]
[TD]12:40 AM
[/TD]
[TD]0:10
[/TD]
[/TR]
[TR]
[TD="align: right"]5/14/2018
[/TD]
[TD]Marination (12:30 AM)
[/TD]
[TD]12:30 AM
[/TD]
[TD]12:40 AM
[/TD]
[TD]0:10
[/TD]
[/TR]
[TR]
[TD="align: right"]5/14/2018
[/TD]
[TD]Fryer (12:30 AM)
[/TD]
[TD]12:30 AM
[/TD]
[TD]12:40 AM
[/TD]
[TD]0:10
[/TD]
[/TR]
[TR]
[TD="align: right"]5/14/2018
[/TD]
[TD]Spirals (1:00 AM)
[/TD]
[TD]1:00 AM
[/TD]
[TD]1:20 AM
[/TD]
[TD]0:20
[/TD]
[/TR]
[TR]
[TD="align: right"]5/14/2018
[/TD]
[TD]Packing (1:30 AM)
[/TD]
[TD]1:30 AM
[/TD]
[TD]1:50 AM
[/TD]
[TD]0:20
[/TD]
[/TR]
[TR]
[TD="align: right"]5/15/2018
[/TD]
[TD]Debone (12:45 AM)
[/TD]
[TD]12:45 AM
[/TD]
[TD]12:50 AM
[/TD]
[TD]0:05
[/TD]
[/TR]
[TR]
[TD="align: right"]5/15/2018
[/TD]
[TD]Breading (12:30 AM)
[/TD]
[TD="align: right"]12:30:00 AM
[/TD]
[TD="align: right"]12:00:00 AM
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]5/15/2018
[/TD]
[TD]Marination (12:30 AM)
[/TD]
[TD]12:30 AM
[/TD]
[TD]12:00 AM
[/TD]
[TD="align: center"]#Value !
[/TD]
[/TR]
[TR]
[TD="align: right"]5/15/2018
[/TD]
[TD]Fryer (12:30 AM)
[/TD]
[TD]12:30 AM
[/TD]
[TD]12:00 AM
[/TD]
[TD="align: center"]#Value !
[/TD]
[/TR]
[TR]
[TD="align: right"]5/15/2018
[/TD]
[TD]Spirals (1:00 AM)
[/TD]
[TD]1:00 AM
[/TD]
[TD]12:46 AM
[/TD]
[TD="align: center"]#Value !
[/TD]
[/TR]
[TR]
[TD="align: right"]5/15/2018
[/TD]
[TD]Packing (1:30 AM)
[/TD]
[TD]1:30 AM
[/TD]
[TD]2:10 AM
[/TD]
[TD]0:40
[/TD]
[/TR]
[TR]
[TD="align: right"]5/16/2018
[/TD]
[TD]Debone (12:45 AM)
[/TD]
[TD]12:45 AM
[/TD]
[TD]12:30 AM
[/TD]
[TD="align: center"]#Value !
[/TD]
[/TR]
[TR]
[TD="align: right"]5/16/2018
[/TD]
[TD]Breading (12:30 AM)
[/TD]
[TD]12:30 AM
[/TD]
[TD]12:30 AM
[/TD]
[TD]0:00
[/TD]
[/TR]
[TR]
[TD="align: right"]5/16/2018
[/TD]
[TD]Marination (12:30 AM)
[/TD]
[TD]12:30 AM
[/TD]
[TD]12:30 AM
[/TD]
[TD]0:00
[/TD]
[/TR]
[TR]
[TD="align: right"]5/16/2018
[/TD]
[TD]Fryer (12:30 AM)
[/TD]
[TD]12:30 AM
[/TD]
[TD]12:30 AM
[/TD]
[TD]0:00
[/TD]
[/TR]
[TR]
[TD="align: right"]5/16/2018
[/TD]
[TD]Spirals (1:00 AM)
[/TD]
[TD]1:00 AM
[/TD]
[TD]12:30 AM
[/TD]
[TD="align: center"]#Value !
[/TD]
[/TR]
[TR]
[TD="align: right"]5/16/2018
[/TD]
[TD]Packing (1:30 AM)
[/TD]
[TD]1:30 AM
[/TD]
[TD]1:30 AM
[/TD]
[TD]0:00
[/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Try remove the space around the <
Code:
=IF(D2 < C2,TEXT(0,"h:mm"),TEXT(D2-C2, "h:mm"))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,270
Members
452,628
Latest member
dd2

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