Sub topic 10
Named Ranges and Referencing Practices
This chapter assumes you can write basic formulas, know the difference between relative and absolute references, and have read the chapters on the inputs and calculations layers. It covers how formulas point at their inputs, and which conventions keep that pointing reliable as the model grows.
Why referencing is a structural issue
The three-layer architecture only works if calculations read from the inputs layer instead of holding their own constants. How a formula reads an input matters as much as the fact that it does. A reference that silently shifts when copied, or that points to the wrong cell after someone inserts a row, breaks the separation without anyone noticing.
Three practices make references dependable:
- Anchor input references with absolute references (
$C$5). - Use named ranges for a small set of scalar inputs that many formulas share.
- Keep each reference's direction consistent with the model's flow: calculations pull from inputs, never the reverse.
Relative, absolute, and mixed references
A relative reference (D10) changes when you copy the formula. An absolute reference ($C$5) does not. A mixed reference locks only one part: $C5 locks the column, and C$5 locks the row.
In a model with a time axis, the two kinds of reference have clear jobs:
- References to the previous period or to another row in the same column should be relative, so the formula copies across the timeline.
- References to a single assumption, such as a growth rate that applies to every year, should be absolute.
Inputs!C5 = 0.10 (growth rate, blue input cell)
Calc!E10 = D10*(1+Inputs!$C$5) (revenue, same formula copied across every year column)
Calc!E12 = E10*(1-Inputs!$C$6) (gross profit, where Inputs!C6 is the COGS percentage)In Calc!E10, D10 is relative, so when the formula is copied one column right it becomes E10, the prior year's revenue. Inputs!$C$5 is absolute, so every year reads the same growth rate.
The most common copy error
Leaving $ off an input reference works in the first column and fails in the next. If E10 held D10*(1+Inputs!C5), copying it to F10 would give E10*(1+Inputs!D5). That points at an empty or unrelated cell. The first year looks right, so the error is easy to miss.
Time-varying inputs
Some inputs change by year, such as a growth rate that is 10% in year 1 and 8% in year 2. Lay these out on the inputs sheet along the same time axis as the calculations, with the same columns for the same years. The calculation then uses a relative column reference to the inputs row, for example Inputs!E5, and one formula still serves the whole row. A mixed reference such as Inputs!E$5 is useful here, because it locks the row but lets the column follow the timeline.
Named ranges
A named range gives a cell or block a label that formulas can use in place of an address. In Excel, you create one from the Name Box, from Formulas > Define Name, or with Ctrl+Shift+F3 to create names from row labels.
Compare the same formula written two ways:
Calc!E10 = D10*(1+Inputs!$C$5)
Calc!E10 = D10*(1+growth_rate)A named input is absolute by default, so you cannot forget the $. The formula also reads like the logic it implements.
Where names help
- Single-value assumptions used across many sheets, such as
tax_rate,growth_rate, anddiscount_rate. - Scenario and switch cells, for example
scenario_selected. - Constants shared by formulas that sit far from the inputs sheet, where tracing an address is slow.
Where names hurt
- Time-series rows. A name for a whole row such as
revenueinvites implicit intersection, where Excel picks the value in the same column. Results then depend on where the formula sits, and the behavior differs between older Excel and dynamic-array Excel. - Hundreds of names. A long list is hard to review and is full of stale entries after rows are deleted. Many models show
#REF!names left behind in the Name Manager. - Names that hide the layer.
Inputs!$C$5tells the reader the value comes from the inputs sheet.growth_ratedoes not, unless your naming convention says so.
A naming convention
Pick one convention and write it in the documentation sheet. A workable one:
- Use lowercase with underscores, and no spaces.
- Put the quantity first and the qualifier after it:
tax_rate,revenue_year1. - Include the unit when it is not obvious:
cogs_pct,opex_annual. - Do not reuse names that look like cell addresses (
Q1,FY24), which Excel rejects or confuses.
Scope matters too. A workbook-scoped name works from any sheet. A sheet-scoped name works only on its own sheet unless you qualify it. Prefer workbook scope for model-wide assumptions and avoid giving the same name to two scopes.
The same idea in code
In Python, the equivalent of an absolute, named reference is reading from a single named structure. The calculation function never holds a constant.
inputs = {
"revenue_year1": 1_000_000,
"growth_rate": 0.10,
"cogs_pct": 0.60,
}
def revenue_path(inp, years):
revenue = inp["revenue_year1"]
path = [revenue]
for _ in range(2, years + 1):
revenue = revenue * (1 + inp["growth_rate"])
path.append(revenue)
return path
print([round(x) for x in revenue_path(inputs, 3)])Writing 1.10 inside revenue_path would be the code version of a hardcode in a formula. Changing the growth rate would then require editing logic.
Cross-sheet and cross-layer references
Reference direction should match the flow of the model. The following table shows which links are allowed.
| From | To | Allowed? | Reason |
|---|---|---|---|
| Calculations | Inputs | Yes | Calculations consume assumptions |
| Outputs | Calculations | Yes | Outputs summarize results |
| Outputs | Inputs | Only to display assumptions | No new logic should be built from them |
| Inputs | Calculations | No | Makes the flow circular and hides dependencies |
| Calculations | Outputs | No | Logic would depend on presentation |
The diagram shows the permitted direction.
If an output sheet needs a value that only exists inside a calculation, link to the calculation row. Do not recompute it on the outputs sheet.
Referencing practices that prevent errors
Link once, then reuse
If an input is needed on a calculation sheet, bring it in with one linking cell at the top of that sheet, then reference the local cell. Many formulas pointing straight at Inputs!$C$5 are fine for a few uses. For heavy use, a local link keeps the formulas short and gives you one place to audit.
Avoid references that skip the structure
- Do not use
INDIRECTto build addresses from text. It is volatile (recalculates constantly), and Excel's precedent tracing cannot follow it. - Avoid
OFFSETfor the same reason.INDEXgives the same flexibility without volatility. - Avoid references to other workbooks. Links break when files are moved or renamed. If external data is needed, import it once into the inputs layer and record the source and date.
- Avoid whole-column references such as
A:Ainside heavy calculation formulas, which slow recalculation.
Use ranges that survive row insertion
A SUM(E20:E22) expands correctly if a row is inserted between 20 and 22, but not if it is added at the edge, below row 22. Include a clearly marked subtotal boundary, or sum a block that includes its header and a blank end row, and test the total after inserting rows. An integrity check that compares components with the total will catch what you miss.
Lookups
When picking a value by scenario or year, prefer INDEX with MATCH, or XLOOKUP where available, with an exact-match setting. A lookup with approximate matching can return a wrong value without an error.
Calc!E8 = INDEX(Inputs!$E$20:$H$20, MATCH(scenario_selected, Inputs!$E$19:$H$19, 0))This pulls the value in row 20 that matches the selected scenario label in row 19. The 0 forces an exact match.
Auditing references
Use Excel's built-in tools to check your work:
- Trace Precedents and Trace Dependents show what feeds a cell and what uses it.
- Show Formulas (Ctrl+`) displays every formula, so you can scan a row for a break in pattern.
- Go To Special > Constants finds typed numbers sitting among formulas.
- Name Manager lists every name, its scope, and its target, and exposes
#REF!entries.
Summary of rules
- Anchor single-value inputs with
$, or name them. - Keep time-series references relative or row-locked so one formula fills the row.
- Do not use names for whole time-series rows.
- Follow one written naming convention.
- Let references flow from inputs to calculations to outputs only.
- Avoid
INDIRECT,OFFSET, and external links in model logic. - Use exact-match lookups.
Exercise
A revenue formula in cell E10 reads =D10*(1+Inputs!C5). It gives the right answer in column E, but when it is copied to column F the result is wrong. Explain the cause and write the corrected formula for E10.
Show answer
Because Inputs!C5 is a relative reference, copying the formula one column right changes it to Inputs!D5, which is empty or holds a different value. The growth rate must be anchored. The corrected formula is =D10*(1+Inputs!$C$5), or =D10*(1+growth_rate) if growth_rate is a named range pointing at Inputs!$C$5.
Exercise
Your colleague defines a named range revenue covering the whole revenue row E10:J10 and writes =revenue*tax_rate in another row. Why is this risky, and what would you do instead?
Show answer
A multi-cell name used in a single-cell formula relies on implicit intersection, so the result depends on which column the formula is in, and it can behave differently in dynamic-array Excel (it may spill instead). Use an ordinary relative reference to the row, such as =E10*tax_rate copied across, and keep names for single-value assumptions.