Discussion on:

Message 6 of 20
3 Votes
+ -
Can you explain the ($B2>$C2) section. ?
The ($B2>$C2) section evaluates a logical expression (TRUE or FALSE) which equates to 1 or 0 when combined with the rest of the numerical expression. If you add zero to any logical expression (e.g. =(A1>A2)+0) it will evaluate to one or zero.

Thus, this is included to accommodate times crossing midnight as the start time will be greater than the finish time and result in a negative number in the expression. A value of one (24 hours in Excel time format) is therefore added to the remainder of the expression to recognize the finish time is "next day" and produce a positive outcome for displaying the time.
Posted by CNSHAW
17th Aug