Requests in, balances out
A leave tracker is a log and two questions: how many days does this request cost, and how
many does each person have left. The log counts working days for you — calendar days minus
Saturdays minus Sundays, done with WEEKDAY arithmetic rather than NETWORKDAYS so the
result is the same in every app and the arithmetic is visible. Balances read the log with
SUMIFS per person and type, for the year on Setup, so last year’s rows can stay.
Pro: holidays, approval, and the calendar
Pro subtracts the public holidays on Setup from each request, adds a Status column so only
Approved requests count (Pending stays yellow, Declined is struck through), and moves
balances to their own sheet with % used and team totals. The Calendar sheet is the one a
manager wants: type the 1st of any month and see people down the side, days across, a
letter per approved day, weekends and holidays shaded, and how many people are off each day.
Each calendar cell is a five-way COUNTIFS — this person, this type, approved, from ≤ day,
to ≥ day — nested once per type so the first match gives the letter. Counting the letters
in a row uses SUMPRODUCT(LEN(…)), because every letter is one character and every empty
result is zero; it’s the portable way to count non-empty formula results.
Checked, not just built
The build recalculates both workbooks in LibreOffice and in a second, independent engine and
compares thirty-five values — day counts for requests that span a bank holiday, start on one
and end in the next month, every balance on the sample team, and specific calendar cells
including the pending request that must not appear — against numbers computed outside Excel.