https://processit.co.nz/processtools.htm

yip still exists

]]>https://stackoverflow.com/questions/58643395/how-to-detect-when-a-workbook-is-closing

]]>
1 |
=SUM(IF(IF($D$2:$D$21>D25,D25,$D$2:$D$21)-IF($C$2:$C$21<C25,C25,$C$2:$C$21)>0,IF($D$2:$D$21>D25,D25,$D$2:$D$21)-IF($C$2:$C$21<C25,C25,$C$2:$C$21),0))*24*60 |

If column D is greater than D25, use D25, else use column D. If column C is less than C25, use C25, else use column C. Subtract the two. If the total is less than zero, use zero, else add up the result. Multiply by 24 hours in a day and 60 minutes in an hour.

That’s one ugly formula.

Also, it’s an array formula so you have to enter by press Ctrl+Shift+Enter, not just enter.

]]>