Formula Definition Excel: How to Create and Use Named Ranges
In this article
Defining a formula or a cell range in Excel is achieved by using the Name Manager to assign a descriptive name to a specific cell, a range of cells, or a constant value. This allows you to replace complex cell references like $C$10:$C$50 with a simple word like "Sales_Data," making your formulas significantly easier to read, maintain, and audit. To do this quickly: select your range, click into the Name Box (the field to the left of the formula bar), type your desired name, and press Enter.
What You'll Need
- A computer with Microsoft Excel installed (Windows or macOS).
- A dataset or a specific value that you intend to reference multiple times across your workbook.
- Basic familiarity with how to select cells and enter formulas.
Step-by-Step
- Select the Target Area: Navigate to your worksheet and highlight the cell or the group of cells you want to define. For example, if you have a tax rate in cell B1, click that cell. If you have a list of prices from A2 to A100, highlight that entire range.
- Use the Name Box Method (Fastest): Locate the Name Box, which is the small input field located to the left of the formula bar (above column A). Click inside this box, delete any existing cell coordinates, type your chosen name (e.g., "TaxRate" or "Quarterly_Revenue"), and press the Enter key. If you do not press Enter, the name will not be saved.
- Use the Name Manager (Detailed): For more control, go to the Formulas tab on the top ribbon. In the "Defined Names" group, click Name Manager. This opens a dialog box where you can click New.... In the popup, enter the name in the "Name:" field and verify the "Refers to:" field contains the correct cell coordinates. Click OK.
- Defining a Constant (Formula Definition): You can define a name that isn't tied to a cell but is a fixed value. In the Name Manager > New dialog, instead of selecting a cell in the "Refers to:" box, simply type a value preceded by an equals sign, such as
=0.075. This creates a global constant you can use in any formula without needing a dedicated cell on a sheet. - Implementing the Defined Name in a Formula: Now that your name is defined, you can use it in any calculation. Instead of typing
=SUM(A2:A100)*B1, you can now type=SUM(Quarterly_Revenue)*TaxRate. Excel will provide an autocomplete suggestion as you begin typing the name. - Applying the Name to Multiple Sheets: By default, names are scoped to the entire workbook. This means if you define "TaxRate" on Sheet1, you can use that same word in a formula on Sheet3 without needing to link back to the first sheet manually.
Common Mistakes
One of the most frequent errors is using spaces in a defined name. Excel does not allow spaces in names; if you try to enter "Sales Data," Excel will either reject it or automatically replace the space with an underscore. Always use underscores (Sales_Data) or CamelCase (SalesData) to separate words.
Another common mistake is naming a range something that looks too much like a cell reference. For example, naming a range "A100" or "R1C1" is prohibited because it would confuse the Excel engine, which wouldn't know if you are referring to the specific cell A100 or your defined range. Avoid names that start with numbers; names must start with a letter, an underscore, or a backslash.
Users often forget to press Enter after typing a name into the Name Box. If you simply click away from the box after typing, the name is discarded, and the cell reference returns to its standard coordinate (e.g., B1). Always ensure the cursor is in the Name Box and the Enter key is pressed to commit the change.
Over-defining names can also lead to "workbook bloat." While naming a few dozen ranges is helpful, naming every single cell in a massive spreadsheet can make the Name Manager difficult to navigate and may slightly impact performance in extremely large files.
Tips
To quickly see all your defined names, click the drop-down arrow in the Name Box. This provides a list of all named ranges in the workbook; selecting one will instantly jump your cursor to that specific range, regardless of which sheet it is on.
Use the "Create from Selection" feature for large tables. If you have a table with headers in the first column and data to the right, highlight the whole table, go to Formulas > Create from Selection, and check "Left column." Excel will automatically create unique named ranges for every row based on the labels in the left column, saving you from manually naming dozens of rows.
When creating names for constants, keep a dedicated "Settings" or "Constants" sheet. Even though you can define a constant in the Name Manager without a cell, it is often better for auditing purposes to have the value visible in a cell and name that cell. This allows other users to see where the number came from without digging into the Name Manager.
Combine named ranges with the SUMIF or VLOOKUP functions to make your logic transparent. For example, =VLOOKUP(Employee_ID, Employee_Database, 2, FALSE) is far more intuitive to a colleague than =VLOOKUP(Z1, 'Data Sheet'!A2:G500, 2, FALSE).
Troubleshooting
If you receive a #NAME? error, it usually means Excel cannot find the name you referenced in your formula. First, check for typos. Ensure the name in the formula exactly matches the name in the Name Manager. Second, check the scope. If the name was defined as "Sheet-specific" rather than "Workbook-wide," it will not work on other sheets.
If you find that a named range is pointing to the wrong cells after you have inserted or deleted rows, go to the Name Manager. Check the "Refers to:" section. While Excel usually updates references automatically, complex shifts can sometimes break the link. You can manually correct the range coordinates here without having to delete and recreate the name.
If you cannot edit a name or it seems "locked," check if the worksheet is protected. Go to the Review tab and click Unprotect Sheet if necessary. Some workbook-level protections can prevent the modification of defined names to ensure the integrity of a financial model.
If the Name Box is not appearing or is unresponsive, ensure you are not in "Cell Edit Mode" (where the cursor is blinking inside a cell). Press Esc to exit edit mode, and the Name Box should become active again.
Frequently Asked Questions
Can I use a named range across different Excel files?
No, defined names are local to the workbook in which they are created. To use a value from another file, you must create an external reference link to that specific workbook's cell or range.
How do I delete a defined name?
Go to Formulas > Name Manager, select the name you wish to remove from the list, and click the Delete button. All formulas using that name will then show a #NAME? error until updated.
Is there a limit to how many names I can create?
There is no practical limit for most users, but having thousands of names can make the Name Manager list cumbersome to navigate. Use a consistent naming convention to keep them organized.
Can a named range be dynamic?
Yes. By using the OFFSET or INDEX functions within the "Refers to:" box in the Name Manager, you can create a range that expands automatically as you add new data to a column.
Do named ranges work in Excel Online?
Yes, named ranges are supported in Excel for the Web. You can create and reference them similarly to the desktop version, though the interface for the Name Manager may look slightly different.
Can I name a range based on a formula?
Yes. In the Name Manager, you can enter a formula in the "Refers to:" field. This allows the name to represent the result of a calculation rather than just a static set of cells.