Microsoft Office Tutorials and References
In Depth Information
Shortcuts for Creating Cell and Range Names
After defining the name, you can use it in a formula. The following formula, for example, returns
the sum of all values in column B:
Names created by Excel
Excel creates some names on its own. For example, if you set a print area for a sheet, Excel
creates the name Print_Area. If you set repeating rows or columns for printing, you also have a
worksheet-level name called Print_Titles. When you execute a query that returns data to a
worksheet, Excel assigns a name to the data that is returned. Also, many of the add-ins that ship with
Excel create hidden names. (See the “Hidden names” sidebar.)
You can modify the reference for any of the names that Excel creates automatically, but make
sure that you understand the consequences.
Hidden names
Some Excel macros and add-ins create hidden names. These names exist in a workbook but
don’t appear in the Name Manager dialog box or the Name box. For example, the Solver add-in
creates a number of hidden names. Normally, you can just ignore these hidden names. However,
sometimes these hidden names create problems. If you copy a sheet to another workbook, the
hidden names are also copied, and they may create a link that is very difficult to track down.
Unfortunately, Excel’s Name Manager doesn’t display hidden names. Here’s a simple Visual Basic
for Applications (VBA) procedure that lists all hidden names in the active workbook. The macro
adds a new worksheet, and the list is written to that worksheet.
Sub ListHiddenNames()
Dim n As Name, r As Long
r = 1
For Each n In ActiveWorkbook.Names
If Not n.Visible Then
Cells(r, 1) = n.Name
Cells(r, 2) = “’” & n.RefersTo
r = r + 1
End If
Next n
End Sub
Search JabSto ::

Custom Search