Let's say you have a number of losses, which contribute amounts A, B, C, ... to the layer.
If there is an aggregate deductible of X, then to calculate the recoveries using an Excel formula you would enter:
=Max(Sum(A,B,C,...)-X, 0)
(this assumes there is no aggregate limit)
In other words, sum the recoveries that would be made if there were no aggregate deductible, and then the cedant can only begin making recoveries once the sum of losses has exceeded the aggregate deductible, in which case they recover the amount excess of the aggregate deductible.