---
name: audit-spreadsheet-formulas
description: "Audit a block of spreadsheet formulas for hard-coded values, shifted references and totals that miss rows or count subtotals twice, and propose the smallest fix. Use when someone asks to check Excel formulas, find formula errors or review a spreadsheet model before relying on its numbers."
license: CC-BY-4.0
metadata:
  author: Raq.com
  version: "2026-11-22"
  homepage: https://skills.raq.com/skills/audit-spreadsheet-formulas
---

# Audit a spreadsheet formula block

Find inconsistent formulas, replaced calculations and missing ranges using the worksheet’s stated rules and neighbouring cells.

## When to use this skill

- Someone has a spreadsheet or model and wants the formulas checked before using the numbers.
- A total looks wrong, a row was inserted, or one cell in a column seems to have been typed over.
- Excel's error-checking warnings flag inconsistent formulas and someone wants to know which matter.

## When not to use it

- Checking whether the model's assumptions or input data are right. The skill checks that formulas implement the stated calculation.
- Comparing two versions of a workbook. Use the spreadsheet versions skill.
- Checking a lookup formula's match mode or duplicate keys. Use the lookup table skill.

## What you need

- Formula view with cell addresses, source ranges and the intended calculation.
- Any rows designated as overrides, rounding adjustments or subtotals.

## Ask before you start

If any of these are missing or unclear, ask before doing the work.

- What should each block calculate, in words? Without the intended rule a formula can only be compared with its neighbours.
- Can you share the formulas with their cell addresses, not just the values? A values-only export cannot show a broken formula.
- Are any rows deliberate overrides, manual adjustments or subtotals, and should each total include hidden or filtered rows?

## Method

1. Work from the formula view or a copy, and keep the workbook unchanged during review.
2. Identify the role of each region from its headings and the stated calculation. Separate inputs, derived rows, overrides and summary cells before comparing neighbours.
3. Translate each repeated formula to offsets from its own cell, as R1C1 notation does, so a shifted reference stands out. Keep absolute and mixed references as written. Check the translated operands against the calculation the block is meant to implement.
4. Flag a literal value inside a derived range unless it is a documented override. Treat Excel's error-checking flags, such as a formula inconsistent with nearby formulas or one that omits adjacent cells, as leads to test against the stated rule, not as findings.
5. Check each total for omitted data rows and for subtotals counted twice. Establish whether it should cover all rows or only visible ones. SUBTOTAL always ignores rows hidden by a filter; function numbers 1 to 11 include manually hidden rows and 101 to 111 exclude them; nested SUBTOTAL results inside its range are ignored.
6. Propose the smallest justified correction with its cell address. Where the intent is unclear, ask before proposing an edit.
7. Recalculate the corrected block on a copy and compare each total with an independent sum of the lines it should cover.

## Checks before you deliver

- An equal cached result can hide a broken formula. Formula text or a reproducible calculation is required.
- Totals and override rows deliberately differ from adjacent rows. Establish their roles first.
- Using SUBTOTAL(9, ...) when manually hidden rows should be excluded. Function 9 includes them; 109 leaves them out. Both ignore rows hidden by a filter.
- Replacing a total with SUM over a range that contains subtotal rows counts those rows twice.
- Correcting an absolute reference such as $B$1 that is meant to point at one fixed input.

## How to present the result

Lead with the number of findings, or a clear statement that no discrepancy was established. Then give a table in row then column order: cell, what is wrong, current formula and proposed formula. Finish with any intent questions that block a fix, and the check to run after editing, such as comparing the total with an independent sum of its lines.

## Worked example

**Request:** Audit C2:C5. C2:C4 should equal that row's quantity in A times price in B. C5 totals those three results.

**Supplied material:**

```text
C2 =A2*B2
C3 24
C4 =A4*B3
C5 =SUM(C2:C3)
```

**Answer:** Restore C3 to =A3*B3 and change C4 to =A4*B4. Extend C5 to =SUM(C2:C4) so the subtotal includes all three order lines. Recalculate on a copy and compare the subtotal with the sum of those lines.

## Structured output for tests

For an ordinary job, answer in the format above and point back to the supplied evidence. Use this structure only for the test cases published with this skill, or when someone asks for structured JSON.

Return findings in row then column order as objects with cell, issue and proposed. Use issue values literal, reference or total-range. proposed is the corrected Excel formula including its equals sign. Use an empty findings list when no discrepancy is established.

## Sources

- [Microsoft Excel: detect formula errors](https://support.microsoft.com/en-us/excel/detect-formula-errors-in-excel): Excel's error-checking rules flag a formula that does not match the pattern of nearby formulas and one that omits adjacent cells, among others. The skill uses these as leads and decides each against the worksheet's stated rule.
- [Microsoft Excel: SUBTOTAL function](https://support.microsoft.com/en-us/excel/functions/subtotal-function): Microsoft documents that function numbers 1 to 11 include manually hidden rows while 101 to 111 exclude them, that filtered-out rows are always excluded, and that nested subtotals are ignored to avoid double counting. The behaviour was also reproduced in LibreOffice Calc, where SUBTOTAL(9) and SUBTOTAL(109) gave different totals over a manually hidden row.

Test cases and an answer checker for this skill: https://skills.raq.com/skills/audit-spreadsheet-formulas
