Define the expected rows before building the formula

Write down which rows should be included, excluded, counted, summed, or returned before drafting the formula. A short expected-result note catches mismatched criteria faster than staring at formula text after the paste.

  • List the criteria columns and the business meaning of each condition.
  • Record whether blanks, zeros, cancelled rows, or archived rows should count.
  • Keep one tiny sample with expected totals or lookup results beside the formula draft.

Check that every criteria range has the same shape

SUMIFS and COUNTIFS need aligned ranges. If one range starts on row 1 and another starts on row 2, the formula can still look valid while counting the wrong records. Confirm sheet names, row starts, row ends, and filtered-export boundaries before copying the formula across a workbook.

  • Use the same row span for every criteria range and sum range.
  • Avoid mixing whole-column references with trimmed sample ranges in the same review.
  • Map wide-table column letters before pasting into a shared sheet.

Treat dates and text criteria as workbook-specific

Date criteria and text criteria are easy to misread because locale, stored date values, smart quotes, and copied whitespace can change the result. Test date windows and text labels on a small sample before trusting the final total or count.

  • Test lower and upper date boundaries separately.
  • Check whether copied labels contain trailing spaces or different casing.
  • Document whether criteria are exact labels, operators such as >=, or wildcard matches.

Review lookup misses and duplicate keys

XLOOKUP is clearest when every lookup key is unique and every miss has an intentional fallback. Before using the result, test one known match, one missing key, and one duplicate-key case so the reviewer knows what the formula returns when the data is imperfect.

  • Confirm lookup and return arrays have the same height.
  • Use a visible fallback such as "Missing" while reviewing unmatched rows.
  • Flag duplicate lookup keys instead of assuming the first match is acceptable.

Compare helper output against a manual check

Before moving the formula into the live workbook, compare the helper output with a filtered table, pivot, or hand-counted sample. The goal is not to prove every production row manually; it is to prove that the criteria and lookup assumptions match the data shape.

  • Compare one SUMIFS total with a filtered subtotal.
  • Compare one COUNTIFS result with a visible row count.
  • Compare one XLOOKUP result with the source row the value came from.

Leave a short review note with the formula

A shared workbook formula should include enough context for the next reviewer to rebuild or challenge it. Note the helper used, the criteria or lookup ranges, the tested edge cases, the fallback behavior, and the sample date or export version used for verification.