View Single Post
 
Old 11-25-2017, 01:31 PM
joeu2004 joeu2004 is offline Windows 7 32bit Office 2007
Advanced Beginner
 
Join Date: Aug 2016
Posts: 32
joeu2004 is on a distinguished road
Default

=MOD(D14-B14,1)*24 - 0.5*(MOD(D14-B14,1)*24 >= 6)

The term MOD(D14-B14,1) handles the case where the start time (B14) is one day and the end time (D14) is the next day ("runs past midnight"). Note: if D14-B14 is zero, that will be interpreted as zero time, not 24 hours.
Reply With Quote