Skip to content
Formula Audit XL
Blog

Excel named ranges best practices for clean models

How to name, scope and size defined names, and a cleanup audit that finds the broken, unused, hidden and imported names a model collects.

By Formula Audit XL Updated 8 min read
  • Model review
  • Auditing
On this page

A formula such as =Revenue*Tax_Rate tells a reviewer more than =C14*Inputs!$D$7. That is the case for names. The risk is what a model collects over time. Broken names return #REF!. Old names point at other files. Hidden names sit where the Name Manager cannot show them. Excel named ranges best practices cover two jobs. The first is how to set names up. The second is how to keep them clean as the model grows.

This article is for analysts who build models and for the reviewers who inherit them. It covers the naming rules, the scope trap and the ranges that stop growing. It also covers the names that come in with copied sheets. It ends with a cleanup audit to run before a model goes out.

Excel named ranges best practices at a glance

  • Follow Excel’s rules, so a name never fails or looks like a cell address.
  • Use one readable convention across the workbook.
  • Choose the scope on purpose when you create the name.
  • Name inputs and reused ranges, not every cell.
  • Make each range grow with its data.
  • Check the names that come in with a copied sheet.
  • Clean the Name Manager before every release.

Follow Excel’s naming rules

Microsoft’s page on names in formulas sets the rules:

  • The first character is a letter, an underscore (_) or a backslash (\).
  • A name has no spaces. Use _ or . to separate words, as in Sales_Tax or First.Quarter.
  • A name cannot look like a cell reference, such as Z$100 or R1C1.
  • The single letters C, c, R and r are not allowed.
  • A name has up to 255 characters.
  • Names are not case-sensitive, so Sales and SALES are the same name.

You can create names in three places. Type a name in the Name Box left of the formula bar. Use Formulas → Define Name for a name with a comment. Use Formulas → Create from Selection (Ctrl + Shift + F3) to name rows or columns from their labels. Microsoft’s page on defining and using names covers all three.

Pick a convention a reviewer can read

ICAEW’s introduction to financial modelling, part 11 sets out what a naming convention needs. A name should be intuitive and unambiguous: SenDebtInt1 over SDI1. The convention should be consistent across the model. It should also allow for growth, so a second debt tranche gets SenDebtInt2 without a rename.

Two habits help the next reader:

  • Group names with a prefix. A sheet or type prefix sorts related names together. Examples are Inp_TaxRate and Calc_EBITDA.
  • Use the Comment field. Microsoft’s page on the Name Manager allows a 255-character comment per name. Note the source and the units there.

Choose the scope on purpose

Each name has a scope: one worksheet, or the whole workbook. The Name Manager page says the scope defaults to Workbook. A name must be unique within its scope.

The trap is a name that exists at both levels. Microsoft’s names page says the sheet-level name wins on its own sheet. So =Budget_FY08 on Sheet1 can read a different range from the same formula on Sheet2. To reach a sheet-level name from another sheet, qualify it: =Sheet1!Budget_FY08.

Keep most names at Workbook scope, so each name has one meaning in the file. Use sheet scope when several sheets share one layout and each needs its own copy of a name. An example is one sheet per region.

Set the scope when you create the name. ICAEW’s Excel tips and tricks 452 notes that the scope cannot be changed later. A change then means a new name and a careful swap in every formula.

Name inputs and reused ranges, not every cell

Names have a cost. The ICAEW modelling article warns that a name hides a formula’s precedents from the reviewer. =Revenue*Tax_Rate reads well, but it does not say where Tax_Rate lives. The reviewer has to open the Name Manager or trace the cell to find out.

So use names where they pay back:

  • Key inputs that many formulas use, such as a tax rate or a start date.
  • Lookup ranges that several formulas read.
  • Formulas with LET and LAMBDA, which Microsoft’s page on defining names lists as a use of names.

Leave the one-off cells of a calculation as plain references.

Keep the $ signs in Refers To. Names use absolute references by default. The Name Manager page explains that a relative reference in a name is relative to the active cell. Type =B2 with C5 active, and the name points three rows up and one column left. It does that from every cell that uses it. That behaviour is rarely what a builder wants.

Make each range grow with the data

ICAEW’s tips 452 makes a point that is easy to miss. When you insert rows inside a named range, the name adjusts. When you add rows below its last row, the name does not.

Suppose Sales_Data refers to $A$2:$A$100 and new data lands in row 101. Every SUM(Sales_Data) still stops at row 100, with no error and no warning.

Two fixes work:

  1. Insert new rows inside the range. Add them above the last row, so the reference expands.
  2. Convert the block to a table. Select it and press Ctrl + T. A table grows when you type in the row below it. Formulas that refer to the table grow with it. The Name Manager lists tables under its Table Names filter.

Some models use an OFFSET formula in Refers To instead. Our article on Excel volatile functions explains its cost and the INDEX form.

Check the names that come in with a copied sheet

A moved or copied sheet brings its names with it. ICAEW’s tips 452 warns that this causes name conflicts and unwanted external links. The ICAEW modelling article adds that imported names are duplicated, default to worksheet scope and bloat the file. Its advice for moving numbers between files is to paste special as values.

When the destination already has a name with the same text, Excel shows the Name Conflict dialog. Microsoft’s page on the Name Conflict dialog explains the two answers:

  • Yes copies the incoming name. The workbook then holds two similar names, and formulas that use them can return errors.
  • No opens a box where you type a new name for the incoming range.

Microsoft’s advice is to select No when you do not know the data in the destination workbook. Subscription versions also show Yes to All, which copies every conflicting name at once. Avoid it for the same reason.

An imported name can also point at the file it came from. Its Refers To then holds a path in square brackets, such as ='C:\Models\[Budget.xlsx]Inputs'!$C$4. The guide to breaking external links shows how to find and remove these links.

Know what the Name Manager does not show

The Name Manager page lists what the dialog leaves out. It does not show names defined in Visual Basic for Applications (VBA), or hidden names. A hidden name has its Visible property set to False. Add-ins and old macros create these, and a hidden name can still hold a link to another file.

To list every name, hidden ones included, add a new empty sheet and select it. Press Alt + F11, then Ctrl + G to open the Immediate window. Paste this line and press Enter:

i = 1: For Each n In ActiveWorkbook.Names: Cells(i, 1) = n.Name: Cells(i, 2) = n.Visible: Cells(i, 3) = "'" & n.RefersTo: i = i + 1: Next

The sheet now has one row per name: the name, TRUE or FALSE for visible, and its reference. A sheet-level name shows with its sheet, such as Sheet1!Budget. Excel also adds some names itself, such as Print_Area and _FilterDatabase. Leave those in place. Our article on finding hidden sheets covers the other places a workbook hides content.

Run a names cleanup before the model goes out

The ICAEW modelling article asks for regular maintenance of the Name Manager. Remove names with errors and names that nothing uses. Work on a copy of the file, because a formula that uses a deleted name returns #NAME?.

  1. Open the Name Manager. Press Ctrl + F3.
  2. Fix the broken names. Select Filter → Names With Errors and read Refers To for each name. Edit the reference, or delete the name if nothing needs it.
  3. Look for duplicates. Select Filter → Names Scoped To Worksheet. A sheet-level name with the same text as a workbook name is the scope trap above.
  4. Look for links. Sort by Refers To and scan for square brackets.

Then work outside the Name Manager:

  1. Keep a record. Use the sheet from the VBA line above. Formulas → Use in Formula → Paste Names → Paste List is shorter, but it leaves out hidden names. It also lists only the sheet-level names of the active sheet.
  2. Find the unused names. Unhide any hidden sheets first. Press Ctrl + F. Set Within to Workbook and Look in to Formulas, then search each name. No match makes the name a candidate for deletion.
  3. Check before you delete. Find does not search other names, charts, data validation, conditional formatting or macros. Our article on finding #REF errors shows where to look in the first four.

One more check needs no dialog. Exceljet’s guide to named ranges notes that Excel shows range names on the sheet at a zoom below 40%. A quick zoom out shows which blocks carry names. Add the names cleanup to your financial model audit so it runs on every release.

Audit every name in one panel

The manual audit takes one search per name and a VBA line for hidden names. It also needs a check of each Refers To. On a model with a few hundred names, that is a long session.

Formula Audit XL is our Excel add-in. Its Named Ranges auditor (Ctrl + Shift + J) lists every defined name with its scope, hidden names included. Each name gets a status: broken, error or unused, with the problem names first. Click a name to go to its range, or delete it from the panel. One limit stays. A name that only another name, a chart, data validation or a macro uses still shows as unused. Check those places before you delete it.

To audit the names in your next model, download Formula Audit XL and start the 7-day free trial.

Frequently asked questions

What are the best practices for named ranges in Excel?

Use names that a reviewer can read without a key, such as SenDebtInt1 instead of SDI1, and keep one convention across the workbook. Leave the scope at Workbook unless a sheet needs its own copy of the name. Keep the absolute references. Make sure each range grows with its data. Then clean the Name Manager before the model goes out: remove names with errors, unused names and names copied in from other files.

How do I find unused named ranges in Excel?

Excel has no filter for unused names. First list the names on a new sheet. Paste List leaves out hidden names and the sheet-level names of other sheets, so a short VBA loop gives a fuller list. Unhide any hidden sheets. Then search each name with Ctrl+F, Within set to Workbook and Look in set to Formulas. A name with no match is a candidate. Before you delete it, check other names, charts, data validation, conditional formatting and macros, because Find does not search them.

How do I delete named ranges that show #REF!?

Press Ctrl+F3 to open the Name Manager. Select Filter, then Names With Errors. Read the Refers To column of each name. Edit it to the correct range if a formula still needs the name. Otherwise select the name and press Delete. Work on a copy, because a formula that uses a deleted name returns #NAME?.

Why does Excel show a Name Conflict dialog?

Excel shows it when you move or copy a sheet into a workbook that already has a name with the same text. Yes copies the incoming name, so the workbook then holds two similar names, and formulas that use them can return errors. No lets you type a new name for the incoming range. Microsoft advises No when you do not know the data in the destination workbook.

Should a named range have workbook or sheet scope?

Use Workbook scope for most names, because each name then has one meaning in the whole file. Use sheet scope when several sheets with the same layout each need their own copy of a name. When both levels hold the same name, the sheet-level name wins on its own sheet. Pick the scope when you create the name, because the Name Manager cannot change it later.

Stop eyeballing models. Start auditing them.

For Microsoft Excel on Windows, Mac and the web · No data leaves your machine