audit-xls
Audit Spreadsheet
Audit formulas and data for accuracy and mistakes. Scope determines depth, from quick formula checks on a selection up to full financial-model integrity audits.
Preflight: Dependency Check
Before starting, verify required libraries are installed and install any that are missing.
python3 -c "import pandas" 2>/dev/null || python3 -m pip install pandas
python3 -c "import openpyxl" 2>/dev/null || python3 -m pip install openpyxl
Important: Do not skip this step — the workflow below will fail without these libraries.
Step 1: Determine scope
If the user already gave a scope, use it. Otherwise ask:
What scope do you want me to audit?
- selection — just the currently selected range
- sheet — the current active sheet only
- model — the whole workbook, including financial-model integrity checks (BS balance, cash tie-out, roll-forwards, logic sanity)
The model scope is the deepest. Use it for DCF, LBO, 3-statement, merger, comps, or any integrated financial model before sending to a client or IC.
Step 2: Formula-level checks (all scopes)
Run these regardless of scope:
| Check | What to look for |
|---|---|
| Formula errors | #REF!, #VALUE!, #N/A, #DIV/0!, #NAME? |
| Hardcodes inside formulas | =A1*1.05 where the 1.05 should be a cell reference |
| Inconsistent formulas | A formula that breaks the pattern of its neighbors in a row or column |
| Off-by-one ranges | SUM or AVERAGE that misses the first or last row |
| Pasted-over formulas | A cell that looks like a formula location but is actually a hardcoded value |
| Circular references | Intentional or accidental |
| Broken cross-sheet links | References to cells that moved or were deleted |
| Unit or scale mismatches | Thousands mixed with millions, or percentages stored as whole numbers |
| Hidden rows or tabs | Could contain overrides or stale calculations |
Step 3: Model-integrity checks (model scope only)
If scope is model, identify the model type: DCF, LBO, 3-statement, merger, comps, or custom, then run the appropriate checks.
3a. Structural review
| Check | What to look for |
|---|---|
| Input/formula separation | Are inputs clearly separated from calculations? |
| Color convention | Blue=input, black=formula, green=link, or the model's equivalent, applied consistently |
| Tab flow | Logical order such as Assumptions -> IS -> BS -> CF -> Valuation |
| Date headers | Consistent across all tabs |
| Units | Consistent: thousands vs millions vs actuals |
3b. Balance Sheet
| Check | Test |
|---|---|
| BS balances | Total Assets = Total Liabilities + Equity for every period |
| RE rollforward | Prior RE + Net Income - Dividends = Current RE |
| Goodwill/intangibles | Flow from acquisition assumptions if M&A applies |
If the balance sheet does not balance, quantify the gap per period and trace where it breaks. Nothing else matters until that is fixed.
3c. Cash Flow Statement
| Check | Test |
|---|---|
| Cash tie-out | CF Ending Cash = BS Cash for every period |
| CF sums | CFO + CFI + CFF = Delta Cash |
| D&A match | D&A on CF = D&A on IS |
| CapEx match | CapEx on CF matches PP&E rollforward on BS |
| WC changes | Signs match BS movements for AR, AP, and Inventory |
3d. Income Statement
| Check | Test |
|---|---|
| Revenue build | Ties to segment or product detail |
| Tax | Tax expense = Pre-tax income x tax rate, allowing for deferred tax adjustments |
| Share count | Ties to dilution schedule: options, converts, buybacks |
3e. Circular references
- Interest -> debt balance -> cash -> interest is a common intentional circularity in LBO and 3-statement models.
- If intentional, verify the iteration toggle exists and works.
- If unintentional, trace the loop and flag how to break it.
3f. Logic and reasonableness
| Check | Flag if |
|---|---|
| Growth rates | Greater than 100% revenue growth without explanation |
| Margins | Outside industry norms |
| Terminal value dominance | TV > about 75% of DCF EV |
| Hockey-stick | Projections ramp unrealistically in out-years |
| Compounding | EBITDA compounds to absurd levels by Year 10 |
| Edge cases | Model breaks at 0% or negative growth, negative EBITDA, or negative leverage |
3g. Model-type-specific bugs
DCF
- Discount rate applied to the wrong period: mid-year vs end-of-year
- Terminal value not discounted back
- WACC uses book values instead of market values
- FCF includes interest expense when it should be unlevered
- Tax shield double-counted
LBO
- Debt paydown does not match cash sweep mechanics
- PIK interest does not accrue to principal
- Management rollover is not reflected in returns
- Exit multiple applied to the wrong EBITDA period: LTM vs NTM
- Fees or expenses not deducted from Day 1 equity
Merger
- Accretion/dilution uses the wrong share count: pre- vs post-deal
- Synergies not phased in
- Purchase price allocation does not balance
- Foregone interest on cash not included
- Transaction fees not in sources and uses
3-statement
- Working capital changes have the wrong sign
- Depreciation does not match the PP&E schedule
- Debt maturity schedule does not match principal payments
- Dividends exceed net income without explanation
Step 4: Report
Output a findings table:
| # | Sheet | Cell/Range | Severity | Category | Issue | Suggested Fix |
|---|
Severity:
- Critical — wrong output: BS does not balance, formula is broken, or cash does not tie
- Warning — risky: hardcodes, inconsistent formulas, edge-case failures
- Info — style or best-practice items: color coding, layout, naming
For model scope, prepend a summary line:
Model type: [DCF/LBO/3-stmt/...] — Overall: [Clean / Minor Issues / Major Issues] — [N] critical, [N] warnings, [N] info
Do not change anything without asking. Report first, fix on request.
Notes
- BS balance first. If it does not balance, everything downstream is suspect.
- Hardcoded overrides are the number one source of silent bugs. Search aggressively.
- Sign convention errors are extremely common.
- If the model uses VBA macros, note any macro-driven calculations that cannot be audited from formulas alone.
More from fivetaku/claude-office-skills
ib-check-deck
Investment banking presentation quality checker. Reviews a pitch deck or client-ready presentation for (1) number consistency across slides, (2) data-narrative alignment, (3) language polish against IB standards, (4) visual and formatting QC. Use whenever the user asks to review, check, QC, proof, or do a final pass on a deck, pitch, or client materials — including requests like "check my numbers", "reconcile figures across slides", "is this client-ready", or "what am I missing before I send this out".
3lbo-model
This skill should be used when completing LBO (Leveraged Buyout) model templates in Excel for private equity transactions, deal materials, or investment committee presentations. The skill fills in formulas, validates calculations, and ensures professional formatting standards that adapt to any template structure.
3dcf-model
Real DCF (Discounted Cash Flow) model creation for equity valuation. Retrieves financial data from SEC filings and analyst reports, builds comprehensive cash flow projections with proper WACC calculations, performs sensitivity analysis, and outputs professional Excel models with executive summaries. Use when users need to value a company using DCF methodology, request intrinsic value analysis, or ask for detailed financial modeling with growth projections and terminal value calculations.
3deck-refresh
Updates a presentation with new numbers — quarterly refreshes, earnings updates, comp rolls, rebased market data. Use whenever the user asks to "update the deck with Q4 numbers", "refresh the comps", "roll this forward", "swap in the new earnings", "change all the $485M to $512M", or any request to swap figures across an existing deck without rebuilding it.
3clean-data-xls
Clean up messy spreadsheet data — trim whitespace, fix inconsistent casing, convert numbers-stored-as-text, standardize dates, remove duplicates, and flag mixed-type columns. Use when data is messy, inconsistent, or needs prep before analysis. Triggers on "clean this data", "clean up this sheet", "normalize this data", "fix formatting", "dedupe", "standardize this column", and "this data is messy".
33-statement-model
Complete, populate and fill out 3-statement financial model templates (Income Statement, Balance Sheet, Cash Flow Statement). Use when asked to fill out model templates, complete existing model frameworks, populate financial models with data, complete a partially filled IS/BS/CF framework, or link integrated financial statements within an existing template structure. Triggers include requests to fill in, complete, or populate a 3-statement model template
3