New Tool Radar

AI for Data & Spreadsheets

How to Check an AI-Written Formula Copied Down for References That Should Be Absolute

Check an AI-written formula copied down a column for relative references that drift when they should stay fixed.

Schematic with three steps: Compare the formula in the first and; Check the first and last rows by; Lock the fixed references with dollar signs.

A formula that works in its first row can go wrong in every row below it when a reference that should stay fixed moves instead. An AI assistant often writes a formula for one row and the reader fills it down, so the lookup table, the rate cell or the threshold quietly shifts one row at a time. Check the first and last filled rows against each other before trusting the column.

What you need

  • The AI-written formula, filled down a column
  • The fixed reference it should point at, such as a rate cell or a lookup table
  • A hand-worked answer for the first and last rows

Step 1: Compare the formula in the first and last rows

Click the first filled cell, then the last filled cell, and read both formulas in the formula bar. Any reference that should be fixed, such as a rate in one cell or a lookup table, must be identical in both; if it has moved, it is relative when it should be absolute.

Step 2: Check the first and last rows by hand

Work out the correct answers for the first and last rows by hand and compare them with the formula results. A first row that is right and a last row that is wrong points at a drifting reference.

Step 3: Lock the fixed references with dollar signs and refill

Add $ to the row, the column, or both for each reference that must stay fixed, then fill the corrected formula down again and re-check the first and last rows.

Worked example: synthetic price list with a tax rate

The table below is a synthetic example. It shows the expected result of checking a copied-down formula; no formula was run.

Check Value Result
Tax rate cell B1 = 0.20 Fixed rate
First row result 120 Correct
Last row result 96 Wrong, rate drifted
Reference in the last row B12 Should still be B1
Corrected result, last row 144 Matches the hand answer

Expected result (UNTESTED). the first row returns 120 correctly, but the last row returns 96 because the rate reference drifted from B1 to B12; locking it as $B$1 gives 144, the correct answer. This check was not run live; the table shows the expected result for the synthetic example.

Limits

  • Locking both the column and the row ($B$1) is right for a single cell; a lookup table usually needs the columns locked and the rows locked too.
  • A reference that should move, such as the row’s own value, must stay relative; locking everything breaks the fill in the other direction.
  • Copying a formula sideways drifts column references the same way; check the first and last columns as well.
  • Named ranges do not drift when filled down, which is one reason to name a rate or a table.

Sources

See all