Hello Ian,
Thanks for the sample file.
The fundamental problem is to assume quasi time-only value, of which date part is hidden, contains meaningful date.
Given B4 and E4 represent quasi time-only values in your sample table, your following formula:
H4 =IF(DUR2HOURS(E4-B4)<0,E4+"1d"-B4,E4-B4)
assumes that -
a) if E4 >= B4, E4 and B4 contain meaningful dates, i.e., E4 and B4 are true date-time value; and,
b) if E4 < B4, E4 and B4 may not contain meaningful dates but E4 - B4 > -1d holds.
Now let the user change the value in E4 from 23:59 to 23:58 on date 2015-08-09, where B4 remains the same as [2015-08-02] 22:00:00, then the resulting duration will be 169h 58m, without any Alert.
Or let the user change the value in B5 from 22:00 to 22:01 on date 2015-08-09, where E5 remains the same as [2015-08-03] 00:00:00, then the resulting duration will be -142h 1m, without any Alert.
etc, etc.
Solution is quite simple. Do not assume quasi time-only value contains meaningful date. Instead, always extract true time-only value from quasi time-only value by means of TIMEVALUE() function and use it in calculation, such as
H4 =DURATION(,MOD(TIMEVALUE(E4)-TIMEVALUE(B4),1))
This is what I keep demonstrating here.
All the best,
Hiroto