If you sort the data in ascending order by date, extension & time, you can calculate the amount of logged out time preceding each session using a formula like:

=C2-IFERROR(AGGREGATE(15,6

The preceding formula requires Excel 2010 or later. Please advise if you are using an earlier version of Excel, as alternative formulas are possible.

DowntimerQ28588750.xlsm