AppGarden Hardcoded Value Detector logo AppGarden

Hardcoded Value Detector

Magic numbers in spreadsheet formulas: why a 1.15 hurts

By Paul Kemp · Published · Updated

=B2*1.15 works. It gives the right answer today. The trouble is everything the 1.15 does not say.

What a magic number is

A "magic number" is a constant written straight into a formula: a markup, a tax rate, an exchange rate, a headcount, a growth assumption. It is an input to the model, but it lives where inputs are not looked for.

Why it hurts

Which numbers are fine

Not every digit in a formula is an assumption. 0 and 1, a /100 for a percentage, the 2 in ROUND(x,2), the column number in VLOOKUP, a square ^2: these are structure, not policy, and moving them into a cell makes the sheet worse, not better. A year in DATE(2026,…) is different — that one goes stale.

How to fix one

  1. Put the number in its own cell with a label next to it — an Assumptions tab is the usual home. For example, Assumptions!A2 reads "Markup" and Assumptions!B2 holds 1.15.
  2. Optionally name it: Data › Named ranges, call it Markup.
  3. Point the formula at it with an absolute reference: =B2*Assumptions!$B$2, or =B2*Markup.
  4. Fill the formula down. Next time the markup changes, it changes in one place.

Finding them

Google Sheets™ does not flag constants inside formulas. Hardcoded Value Detector lists every one on the active sheet for free, skipping the structural numbers above, and explains each finding in one line.

Also worth reading: How to find hardcoded values in Google Sheets™.

Check your own sheet for free. Hardcoded Value Detector is free in the Google Workspace™ Marketplace. Find out how to install it, or read the step-by-step guide.