Apply Names
Make a coordinate-heavy model read in business terms again. Apply Names is the inverse of Flatten: it scans formulas and replaces raw cell references with the existing defined names that point at exactly those cells. It is strict by design — a reference is renamed only on an exact match, no new names are ever created, and several categories of name are deliberately left alone for safety — and the run is reversible through Restore.
The scenario
You’ve inherited a model full of raw coordinates — =$E$10-$E$11 — but the workbook already defines the right names (Revenue is $E$10, Costs is $E$11). Apply Names rewrites those references in business terms so the formula reads =Revenue-Costs, without you retyping anything and without adding a single new name.
How it works: strict reverse lookup
For each cell reference in a formula, Apply Names looks for a defined name whose target is exactly that range, and substitutes the name. The emphasis is on exact and existing:
- Existing names only — it never creates names. Apply is a lookup against the workbook’s current Name Manager. If no name targets a reference, the reference is left as-is. There is no “auto-name” step.
- The match must be exact. The reference’s range must equal the name’s target range cell-for-cell, on the same sheet.
$A$1:$A$5matches a name defined as$A$1:$A$5, but not one defined as$A$1:$A$6. - Anchoring doesn’t matter. Matching is by the cells, so
A1and$A$1both match a name on that cell — relative vs absolute makes no difference to whether a name applies. - Partial and overlapping references are skipped. A reference to
$A$1that sits inside a name defined as$A$1:$A$5is not a match — it’s left unchanged. Apply never substitutes a name for a reference that is only part of the name’s range.
No new names are ever created
This is worth stating plainly because it’s the inverse of what some “apply names” tools do. ModelXcel Pro’s Apply Names only uses names that already exist in the workbook. It will never define Revenue for you; it only recognizes that $E$10 already is Revenue and writes that.
Before & after
Assume the workbook defines Revenue ($E$10) and Costs ($E$11) at workbook level, a sheet-local Foo on Sheet1 ($A$1), and a sheet-local Foo on Sheet2 ($A$1):
| Case | Before | After |
|---|---|---|
| Raw reference → workbook-level name | =$E$10-$E$11 | =Revenue-Costs |
| Raw reference → sheet-local name (on its own sheet) | =$A$1+1 | =Foo+1 |
| Cross-sheet reference → qualified name | =Sheet2!$A$1+1 | =Sheet2!Foo+1 |
| No exact name — skipped | =$A$1:$A$5+1 | =$A$1:$A$5+1 (unchanged) |
On its own sheet a name is written bare (Foo); reached from another sheet it’s emitted sheet-qualified (Sheet2!Foo) so it still resolves correctly.
What Apply deliberately leaves alone
Several kinds of name are excluded on purpose, because applying them could change what a formula means rather than just how it reads:
| Excluded | Why |
|---|---|
| Hidden names | Names marked not visible are excluded from the lookup, so Apply never surfaces a deliberately hidden name into a user-facing formula. |
| Multi-area names | A name covering several non-contiguous areas is refused. A single reference covers one rectangle; substituting a multi-area name would widen the formula from one range to the union of all the name’s areas — a change in meaning, not just appearance. |
| External references | References into another workbook are skipped — a local name is never applied to an external reference. |
| Names scoped to another sheet | A worksheet-scoped name is only visible on its own sheet (or via an OwnerSheet!Name reference). It won’t be applied to references on other sheets. |
Multi-area names are refused, with a reason
When a reference matches one area of a multi-area name, Apply does not substitute it. It leaves the formula unchanged and reports it: “Address Sheet1!$A$1 is one area of a multi-area defined name; refusing to substitute (would expand formula semantics).” Even if a single-area name also targets that exact cell, the presence of a multi-area name forces the refusal — the safe choice when the substitution is ambiguous.
Visibility & precedence
Excel lets a name be workbook-level (visible everywhere) or sheet-local (visible only on its own sheet). Apply respects that, and follows Excel’s own precedence when both target the same cells:
- Workbook-level names are visible to references on any sheet.
- Sheet-local names are visible only to references on their own sheet — or to a qualified reference like
Sheet2!$A$1that reaches that sheet. - Sheet-local wins. If a sheet-local name and a workbook-level name both target the reference’s cells, the sheet-local name is used — matching how Excel itself resolves the two.
When two names target the same cells
If more than one visible name points at the same range, that’s a collision. Apply does not skip it — it resolves deterministically and flags it for you:
- It still substitutes, picking by precedence: a sheet-local name on the reference’s sheet beats a workbook-level one; among names of the same scope, the first one wins.
- It warns. The summary includes a collision notice — “Apply picks one deterministically; verify in Name Manager if ambiguous” — so you can confirm the choice matches your intent.
Collisions are a warning, not a skip
Don’t expect a colliding reference to be left untouched. Apply will rename it, choosing one of the candidate names by the precedence rule above. The warning exists precisely because, among two names of the same scope on the same cells, the choice is by internal order — not your intent. When you see a collision warning, open the Name Manager and make sure the name it chose is the one you meant. (Multi-area is the one case that is refused outright; see above.)
Scope, progress & results
Apply Names uses the same Choose Scope dialog (Entire workbook / Active sheet / Current selection), the same cancelable progress window, and the same summary format as Flatten Names. As with Flatten, a formula that would exceed Excel’s 8,192-character limit after rewriting is skipped rather than truncated, protected sheets are skipped whole, and hidden/very-hidden sheets are auto-skipped under Entire-workbook scope. See Rules & troubleshooting for the complete list.
Undoing an apply
- Restore — Restore (keytip
RN) writes the original references back from the in-memory snapshot. Most recent run only, this session only. - Not Ctrl+Z. Use Restore; programmatic writes don’t reliably feed Excel’s native undo.
- Or flatten again. To get back to raw coordinates after the snapshot is gone, run Flatten Names.
One conversion at a time
As with Flatten, while a snapshot is still active you can’t start a second conversion — Apply is refused with “A previous Flatten/Apply snapshot is still active for this workbook. Run Restore first…” Restore (or close the workbook) before re-running.
Related
- Flatten Names — the inverse: names to direct references.
- Restore — how the snapshot works and what it skips.
- Rules & troubleshooting — every skip reason, the collision rule, and the command matrix.
- Name Conversion overview — the round trip and when to use each command.