Leave Remaining Formula

I have an automated sheet for tracking annual leave requests. I use a formula (below) to track remaining leave. This formula recalculates and subtracts time taken as new requests are made for each employee.

=INDEX({Days Remaining}, MATCH(Primary6, {Employee}, 0))

However, on all the requests (rows), the column [Days Remaining] is tracking the OVERALL leave remaining, but I would like it to calculate the remaining leave TO DATE at the time of each request.

Can someone help me to edit the formula to achieve this?



Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!