To find variable names in Excel, open Formulas > Name Manager to review workbook-defined names, or use the Name Box to jump to a particular named cell or range. Excel usually calls these items defined names, rather than variables. You can inspect what each name refers to, whether it applies to the whole workbook or one worksheet, and whether it is a range, formula, or constant. The steps below are for Excel for Microsoft 365 on Windows.
What You’ll Need
- An Excel workbook open in the desktop app. If the workbook is read-only, you can still inspect names, but you may not be able to edit or delete them.
- Permission to view the workbook and, if needed, knowledge of which worksheet or formula uses the name you are investigating.
- For Excel for the web, a browser and access to the workbook. Some name-management options are more limited than in the desktop app, so use desktop Excel if you cannot find a required command.
Step-by-Step
- Open the Name Manager. In Excel for Windows, select Formulas > Name Manager in the Defined Names group, or press Ctrl+F3. This opens a list of defined names in the workbook. If the ribbon is simplified or the window is narrow, expand the Defined Names group or maximize Excel to reveal the command. On Mac, open the Formulas tab and choose Name Manager if available; keyboard shortcuts can differ by keyboard and macOS settings.
- Read the list and identify the relevant columns. The Name Manager shows columns such as Name, Value, Refers To, Scope, and Comment. The Name column contains the identifier used in formulas. Refers To shows the cell, range, formula, or constant associated with it. Scope tells you whether it is available across the workbook or only within a particular sheet. Click a column heading to sort the list by that field, if sorting will make a long list easier to scan.
- Inspect what a name points to. Select a name and look at its Refers To entry. A reference such as a worksheet name followed by a cell address points to a cell or range. An entry beginning with an equals sign may instead be a formula or a fixed value. For example, a name can refer to a calculation rather than a block of cells. Do not assume that every defined name represents a visible range on the current sheet.
- Check the name’s scope before using it. A workbook-scoped name is intended to be available throughout the file. A sheet-scoped name works only on its assigned worksheet and may have the same spelling as a workbook-scoped name. The Scope column identifies the sheet for a local name. If two names have the same spelling, check the scope and the formula’s worksheet before deciding which one is being used.
- Jump to a name with the Name Box. Close or move the Name Manager, then find the Name Box at the left end of the formula bar, above the worksheet grid. Open its drop-down arrow and look through the available names, or type a known name into the box and press Enter. Excel selects the referenced cell or range when it can resolve that name. The box also displays the active cell address, so make sure you are using the small box beside the formula bar, not a worksheet cell.
- Use Go To to browse names and navigate. Press Ctrl+G or F5 in Windows Excel to open the Go To dialog. Review the list of available references, select a name, and choose OK to go to it. You can also enter a known name in the Reference box. This is useful when you want to move to the named range without opening the full Name Manager. On Mac, use Home > Find & Select > Go To if the shortcut differs on your keyboard.
- Check the ribbon’s name list when writing or reviewing a formula. Select Formulas > Use in Formula to display available defined names and insert one into the active formula. This can help you confirm the spelling of a name. It does not explain every detail about the name; return to Name Manager to inspect its reference and scope. A name that is local to another worksheet may not be available in the same way in your current context.
- Look for table names separately when appropriate. Excel tables have names, such as Table1, and formulas can refer to their columns using structured references. These are not the same as ordinary cell or range names, though Excel’s name tools may list table names among defined items. To inspect a table, click inside it and use the Table Design tab to view its Table Name box. If the term variable refers to a data field in a table, check the table’s column headings as well as Name Manager.
- Make a careful change only after confirming the reference. To edit a defined name, select it in Name Manager and choose Edit; check both the spelling and Refers To field before saving. To create a new name, select the intended cell or range and choose Formulas > Define Name. Avoid changing or deleting a name just because its purpose is unclear: formulas, charts, validation lists, and other workbook features may depend on it. Save a copy before making changes to an unfamiliar workbook.
Common Mistakes
Looking only at the worksheet grid. A defined name does not have to be printed in a cell. It may be used only inside formulas, charts, validation rules, or other workbook features. Use Name Manager to see the definitions themselves, then investigate worksheet formulas or features if you need to know where a name is used.
Confusing a column heading with a defined name. A heading such as Revenue is ordinary cell text unless it has also been defined as a name. Table headings can be used in structured references, but that does not make each heading a standard defined name. If you are unsure, inspect the table and Name Manager separately.
Ignoring worksheet scope. A local name can have the same spelling as a workbook-level name. A formula may resolve to the local one when used on its worksheet, even though the workbook-level name appears to be the obvious match. Check Scope and the formula’s location before changing anything.
Assuming every name refers to a cell. Defined names may point to formulas or constants, and some names may return errors because their original cell or sheet was deleted. Read Refers To rather than relying on the name’s label or the Value column alone.
Overlooking hidden or generated entries. Some workbooks contain names created by Excel features, add-ins, or other applications. They may be unfamiliar or not appear in every name-selection list. Do not remove entries simply because they look technical; first check whether formulas or workbook features rely on them.
Tips
- Use descriptive names that indicate purpose, such as TaxRate or Input_Date, rather than vague labels like Range1. Excel names cannot contain spaces, and they must not be written in a way that Excel interprets as a cell address.
- When a formula contains a name, select the formula cell and inspect the formula bar. Compare the spelling with the Name Manager entry, including any worksheet scope that could change which definition applies.
- For a very long list, sort by Name or Scope in Name Manager and inspect the Refers To field for likely matches. The filter menu can help narrow the displayed types of entries; available filters depend on the Excel version.
- Use the Name Box to navigate, not to prove that a name is valid throughout the workbook. The current sheet and name scope can affect what Excel resolves, so verify ambiguous names in Name Manager.
- Keep a brief comment for important names. In Name Manager, the Comment field can document what a name represents or why it exists, which makes later maintenance safer.
- If you are working in Excel for the web and cannot access the full list or make a required change, open the workbook in the desktop app. The web interface and available name-management features can vary as Microsoft updates the service.
Troubleshooting
Name Manager is empty or a name is missing. Confirm that you opened the correct workbook and that the name is not actually a table name, a worksheet heading, or a label in a cell. Check the Name Box and the formula that prompted your search. If a name is sheet-scoped, look at the relevant worksheet and inspect the Scope column. Excel’s selection lists may not show every kind of name in every context.
Typing a name in the Name Box does not move the selection. Check the spelling and press Enter. If Excel reports that the reference is invalid, the name may have been deleted, may be scoped to another sheet, or may refer to a broken reference. Open Name Manager and inspect Refers To. If the name is local to a different sheet, go to that sheet and try again.
A formula uses a name that you cannot identify. Select the formula cell and note the name exactly as written. Look for matching workbook- and worksheet-scoped entries in Name Manager. If several entries match, compare their scopes and references. Also check for table structured references, which can resemble names but refer to table columns.
A name points to #REF! or an unexpected location. In Name Manager, select the entry and review Refers To. A #REF! usually means part of the original reference was removed or moved in a way Excel could not preserve. If the target is unexpected, trace the sheet name and cell address carefully before editing; dependent formulas may change when the definition is corrected.
You cannot edit or delete a name. The workbook may be read-only, protected, shared in a restricted way, or open in a version with limited name-management support. Check whether the file is in Protected View or whether worksheet or workbook protection is enabled. If you have permission, save an editable copy and open it in desktop Excel before attempting the change.
Frequently Asked Questions
Are variable names and defined names the same thing in Excel?
Usually, people asking about variable names mean Excel’s defined names: labels assigned to cells, ranges, formulas, or constants. Excel worksheet formulas do not use general-purpose variables in the same way as a programming language. Excel also has table names and names used in features such as LAMBDA, so check the context in which you saw the term.
What is the fastest way to find all defined names?
In Windows desktop Excel, press Ctrl+F3 to open Name Manager. It provides a fuller view than the Name Box because it shows each name’s reference and scope. Use the Name Box or Go To when you already know a name and want to navigate to it.
Can I find where a defined name is used?
Name Manager shows what a name refers to, but it is not a complete list of every formula or feature that uses it. Search workbook formulas for the name, taking care that ordinary text may produce false matches. Also check charts, data validation, conditional formatting, and other features that may refer to the name.
Why are there two names with the same spelling?
One may be workbook-scoped and the other may be limited to a worksheet. Excel allows names with the same spelling when their scopes differ. Compare the Scope and Refers To columns, and consider which worksheet contains the formula using the name.
Can I see defined names in Excel for the web?
Some name viewing and editing options are available in Excel for the web, but the interface and capabilities may differ from desktop Excel. If Name Manager or a needed scope detail is unavailable, open the file in Excel for Microsoft 365 on Windows or Mac and inspect it there.
Do table column headings count as variable names?
Not usually. A table has a table name, and its headings can appear in structured references such as a table-column reference. These are useful identifiers, but they are different from ordinary defined names that you inspect in Name Manager.
Related
- IF vs IFS in Google Sheets: Which Formula Should You Use?
- Forward Google Sheets: What Happens When You Share?
- IFERROR Formula in Google Sheets: Syntax and Examples
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Google Docs and Google Sheets: Differences and UsesGoogle Docs is Google’s word-processing app for writing and formatting documents; Google Sheets is its spreadsheet app for…
- Google Sheets Data Cleaning: Tools, Steps, and TipsGoogle does not make a product called Google Excel: its spreadsheet app is Google Sheets, and it includes…
- Excel Row Limit Per Sheet: Maximum Rows ExplainedMicrosoft Excel supports a maximum of 1,048,576 rows per worksheet, from row 1 through row 1,048,576. That limit…
- Google Sheets Duplicate Formula: Find or Flag RepeatsTo find duplicate values in Google Sheets, use =COUNTIF($A$2:$A$100,A2)>1 in a helper column, assuming the values are in…
- How to Insert a Line in Word Using Your KeyboardTo insert a horizontal line in Microsoft Word with your keyboard, put the cursor in an empty paragraph,…
- How to Double Space in Word Using Your KeyboardTo double-space text in Microsoft Word on Windows, select the text or place the cursor in the paragraph,…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.