Headcount billing, built straight from payroll.
Clients were billed by headcount from a sheet rebuilt by hand each cycle. I wrote a script that builds it from payroll data, matching the manual version exactly.
Languages
Tools & platforms
AI & LLM
Skills
rows × columns, identical to the manual sheet
The thinking behind it
- 01 · What I noticed
Billing was rebuilt from payroll by hand, and any change risked a wrong invoice.
- 02 · What I decided
Script it, then prove it: match the manual sheet exactly before anyone relies on it.
- 03 · What I delivered
Output identical to the manual original: 207 rows by 44 columns.
Old system vs new system
- Export payroll
- Count heads per client
- Apply rates by hand
- Check totals twice
- Payroll runs
- Script builds the sheet
- Diagnostics explain any difference
- Ready for invoicing
Watch it run
Click through the four steps. In step 3, click any box to see what it does.
Matching the manual sheet exactly.
Billing errors cost trust, so close was not good enough. The script had to reproduce the manual sheet exactly (207 rows by 44 columns) before anyone relied on it, with diagnostics that explain any difference.
Why it's built this way
Prove it with an exact match
The new output was compared cell by cell with the manual version.
Diagnostics, not guesses
When numbers differ, the script explains why.
Payroll as the single source
Billing is built from payroll data, not retyped.
What made it work
- 01
Trust comes from matching the old way
People adopt automation when it agrees with what they know.
- 02
Explain differences automatically
Diagnostics turn "it looks wrong" into a quick fix.
- 03
Build from the source
Copying numbers between sheets is where errors start.
Have a similar mess? Tell me the step you hate.