Using the following formula, I receive a negative number error (######) when clearly the start and end dt/times are not weekend/holiday/afterhrs or out of sequence. How do I fix this formula to give 00:34 Business Hrs on the first example below instead of the error ## for the -.23?
=IF(BN2-BE2<0, #VALUE!, (NETWORKDAYS(BE2, BN2, Holidays!$B$2:$B$34)-1)*(CH2-CG2)+IF(NETWORKDAYS(BN2, BN2, Holidays!$B$2:$B$34),MEDIAN(MOD(BN2,1), CH2, CG2), CH2)-MEDIAN(NETWORKDAYS(BE2, BE2, Holidays!$B$2:$B$34)*MOD(BE2,1), CH2, CG2))
Start Dt/Time End Dt/Time Start Day End Day Business Hrs
9/1/2012 10:19 9/1/2012 10:53 06:00 23:00 (0.23)
9/1/2012 14:10 9/1/2012 14:58 06:00 23:00 (0.23)
8/31/2012 23:55 9/4/2012 6:19 07:00 15:00 (0.40)
8/31/2012 23:55 9/4/2012 6:20 07:00 15:00 (0.40)
9/4/2012 16:10 9/5/2012 6:15 06:00 14:30 (0.06)
9/4/2012 16:10 9/5/2012 6:15 06:00 14:30 (0.06)
9/4/2012 16:09 9/5/2012 6:15 06:00 14:30 (0.06)
Bookmarks