How to find hardcoded values in Excel (cells and formulas)
A hard-coded number is the most common way a model goes quietly wrong: a forecast that someone typed over, a growth rate written into a formula and forgotten. This guide shows how to find both kinds in Excel, what each built-in tool misses, and how to fix what you find.
Quick answer: to find numbers typed into cells, press F5 › Special › Constants › Numbers. To find numbers inside formulas, press Ctrl+` to show formulas, or use a FORMULATEXT + REGEXTEST rule in Microsoft 365. To find a formula overwritten with a number, select the row and use Row differences (Ctrl+\).
What counts as a hardcoded value
"Hardcoded" means a number typed in rather than calculated. In practice there are two different things, and Excel finds them in different ways:
- A number typed into a cell. In an input block this is how it should be: prices, volumes, tax rates. The problem is a typed number in a calculation block, most often a formula that someone overwrote with its value — the model still looks right, but that cell no longer reacts to the inputs.
- A number inside a formula, such as
=B5*1.1or=C20+150. The assumption is hidden where nobody will see it or update it. Unit conversions like/1000or/12are usually fine; growth rates, prices and manual adjustments are not.
So the task is not just to find every constant — it is to separate legitimate inputs from errors.
Method 1. Go To Special › Constants
- Click a single cell to search the whole sheet, or select a range to search only there.
- Press F5 (or Ctrl+G), click Special. The same dialog is under Home › Find & Select › Go To Special.
- Choose Constants, untick Text, Logicals and Errors, leave Numbers, click OK.
- Excel selects every typed-in number. Fill them with a color if you want to keep the result visible.
Limits: one sheet at a time; legitimate inputs and overwritten formulas are selected together; numbers inside formulas are not found at all; the selection disappears with the next click.
With Jumpcel: the formula map (Ctrl+Shift+M) colors typed-in numbers yellow and, separately, unused numbers grey — values that no formula in open workbooks refers to. You see at once which hard-codes drive the model and which are dead weight. Select several sheet tabs with Ctrl to map them all in one go.
Method 2. Conditional formatting that stays on
To keep hard-codes highlighted while you work, use a rule instead of a one-off selection:
- Select the area, for example
A1:AR600, withA1as the active cell. - Home › Conditional Formatting › New Rule › Use a formula to determine which cells to format.
- Enter
=AND(ISNUMBER(A1),NOT(ISFORMULA(A1)))and pick a fill color.
The rule updates as the model changes: overwrite a formula with a number and the cell lights up. Limits: the rule has to be added to every sheet, it covers your own fills, and it adds conditional formatting to the file that you will want to remove before sending it.
With Jumpcel: no rules to set up and nothing left in the file. The map remembers the original fill and restores it when you close the map window — and if you close the workbook with the map still on, the coloring is removed before Excel asks to save.
Method 3. Find a formula overwritten with a number
This is the hard-code that does the most damage: one period in a forecast row holds a typed value instead of the formula. Excel's green "inconsistent formula" triangle is little help here: it compares formulas with neighbouring formulas, and a typed number usually goes unflagged.
- Select the row of the time series, starting from a cell with the correct formula.
- Press Ctrl+\ (Go To Special › Row differences). Excel selects the cells whose content differs from the first one; for formulas it compares the logic, not the cell addresses.
- A typed number in the row is selected. For columns, the same works with Ctrl+Shift+| (Column differences).
This is reliable, but only for one row at a time. On a sheet with hundreds of rows, a conditional formatting rule from method 2 or a quick scan with Ctrl+` is faster.
…+0.001). The legend counts the cells in each category.With Jumpcel: on the formula map copied formulas have their own colors — copied right, copied down — so a yellow cell inside a row of formulas stands out across the whole sheet, not one row at a time. Click Hard-coded number in the legend and all such cells are selected.
Method 4. Find numbers inside formulas
Go To Special can't see these: a formula is a formula, whatever is written inside it. Two options in Excel:
- Show Formulas (Ctrl+`) displays formulas instead of values. Widen the columns and read. It works, but in a model with thousands of formulas you will miss things.
- A regex rule in Microsoft 365. A conditional formatting rule with
=IFERROR(REGEXTEST(FORMULATEXT(A1),"[=+\-*/^(,]\d"),FALSE)flags formulas where a digit follows an operator, a bracket or a comma —=B5*1.1,=C20+150,=ROUND(A1,2). Cell references likeA1are not flagged, because their digits follow a letter. Expect some noise from function arguments and unit conversions;REGEXTESTis not available in Excel 2021 and older.
With Jumpcel: formulas with numbers inside them are peach on the map — including formulas with no references at all, like =100*12. Technical constants — /1000, *365, /12 and the like — go to a separate, pale category, so unit conversions don't drown out the real hard-codes. The list of technical constants is configurable.
Method 5. A macro for the whole workbook
If you are comfortable with VBA, a few lines color typed-in numbers on every sheet:
Sub MarkHardcodes()
Dim ws As Worksheet, rng As Range
For Each ws In ActiveWorkbook.Worksheets
Set rng = Nothing
On Error Resume Next
Set rng = ws.UsedRange.SpecialCells(xlCellTypeConstants, xlNumbers)
On Error GoTo 0
If Not rng Is Nothing Then rng.Interior.Color = RGB(255, 255, 153)
Next ws
End Sub
Run it on a copy: the macro overwrites the existing fill and cannot be undone with Ctrl+Z. Like Go To Special, it finds typed-in numbers but not numbers inside formulas.
How to fix hardcoded values
- Overwritten formula: copy the formula back from the neighbouring period, then check why it was overwritten — sometimes it was a deliberate override that should become a proper input with a switch.
- Number inside a formula: move it to an input cell with a label and units, and refer to that cell:
=B5*(1+$F$12)instead of=B5*1.1. - Inputs: keep them in input blocks or on an input sheet, and mark them with one color convention — commonly blue font for inputs, black for formulas.
- Unused numbers: either connect them to the calculation they were meant for or delete them, so nobody updates a number that changes nothing.
- Before changing an input, check what depends on it with Formulas › Trace Dependents.
With Jumpcel: select an input and press Ctrl+Shift+Q — you get every formula that uses it, in all open workbooks, grouped into blocks. That is the list of what your fix will touch.
Where Excel's built-in tools stop
- Two kinds, two toolsets. Go To Special finds typed-in numbers; numbers inside formulas need Show Formulas or a regex rule. There is no single view of both.
- Inputs and errors look the same. A typed-in price and a typed-over forecast are both "constants"; Excel doesn't tell you which numbers are actually used.
- One sheet, one row at a time. Go To Special and rules work per sheet; Row differences works per row.
- Unit conversions are noise. Every
/1000and/12looks like a hard-code to a simple search. - Your formatting gets in the way. Coloring cells to mark findings overwrites the model's own fills.
- No list to work through. Nothing records which hard-codes you have checked and what you decided.
Jumpcel vs. Excel's built-in tools
Jumpcel is an Excel add-in for building, reviewing and taking over models. For hard-codes it adds:
| Excel's built-in tools | Jumpcel | |
|---|---|---|
| Typed-in numbers | Go To Special › Constants, sheet by sheet | Yellow on the formula map; a report for the whole workbook |
| Numbers inside formulas | Show Formulas and read, or a regex rule in Microsoft 365 | A separate category, highlighted automatically |
| Unit conversions | Mixed in with real hard-codes | Technical constants: their own category, configurable list |
| Is the number used? | Trace Dependents on each cell | Unused numbers in grey |
| Overwritten formulas | Row differences, one row at a time | A yellow cell among copied formulas, visible across the sheet |
| Your formatting | Overwritten by fills or rules | Restored when the map closes; never saved into the file |
| Review log | Kept separately | Review status column in the formula audit report |
One report for the whole workbook
The map is for looking; the formula audit is for working through. One click adds a report sheet that lists hard-coded numbers, numbers inside formulas, technical constants and unused numbers — together with inconsistent formulas, errors and references to empty cells — for every sheet, with links to the cells. Copies of the same formula are grouped into one line, and a Review status column holds your marks ("Checked", "Fix", "Assumption"), which carry over when you run the report again.
Why analysts use Jumpcel
Jumpcel is made by BIG4 and IB financial modelling professionals for building, reviewing and taking over models.
Every hard-code, every sheet
Typed-in numbers, numbers inside formulas and unused inputs in one report for the whole workbook, with links to the cells.
Signal, not noise
Unit conversions like /1000 and /12 sit in their own category, so the real hard-codes stand out.
Your formatting stays intact
The formula map restores the original colors when it closes and never gets saved into the file.
Safe for confidential models
No network connections: workbooks never leave your computer and the license is checked offline. No macros, no administrator rights. Free for 14 days.
Questions and answers
What is a hardcoded value in Excel?
A number typed in directly instead of being calculated or referenced. It is either a value typed into a cell, or a number written inside a formula, such as =B5*1.1. Inputs in a dedicated input block are hard-coded by design; a typed number in the middle of a calculation, or a constant buried in a formula, is usually a problem.
What is the shortcut to find hardcoded values in Excel?
Press F5 (or Ctrl+G), click Special, choose Constants, leave only Numbers ticked and click OK. Excel selects every typed-in number on the sheet, or in the selected range.
How do I find hardcoded numbers inside formulas?
Go To Special does not see them. Press Ctrl+` to show formulas and read them, or in Microsoft 365 use a conditional formatting rule with FORMULATEXT and REGEXTEST that flags a digit after an operator. An add-in such as Jumpcel highlights formulas with numbers inside them automatically.
How do I find a formula that was overwritten with a number?
Select the row of the time series and use Go To Special › Row differences (Ctrl+\): the typed number differs from the formulas and is selected. A conditional formatting rule that colors numbers without formulas also makes it stand out among the calculated cells.
What color should hardcoded numbers be in Excel?
The common financial modelling convention is blue font for hard-coded inputs, black for formulas and green for links to other sheets. Whatever the colors, the point is that one convention is used throughout the model.
More guides: How to audit a financial model · Excel formula auditing · Tracing precedents and dependents
Find every hard-code in your model
Jumpcel is free for 14 days, with every feature included.