0% found this document useful (0 votes)
26 views6 pages

Naming Ranges and Other Objects

The document provides a detailed guide on naming ranges and objects in Excel, explaining how to define names for cells, ranges, and tables to enhance formula clarity. It includes step-by-step instructions for naming ranges, assigning names to tables, and managing named ranges using the Name Manager feature. Additionally, it outlines rules for naming ranges and highlights the advantages of using named references in formulas.

Uploaded by

antoniofreches
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views6 pages

Naming Ranges and Other Objects

The document provides a detailed guide on naming ranges and objects in Excel, explaining how to define names for cells, ranges, and tables to enhance formula clarity. It includes step-by-step instructions for naming ranges, assigning names to tables, and managing named ranges using the Name Manager feature. Additionally, it outlines rules for naming ranges and highlights the advantages of using named references in formulas.

Uploaded by

antoniofreches
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

OneNote https://euc-onenote.officeapps.live.com/o/onenoteframe.aspx?ui=pt-PT&...

Naming Ranges and Other Objects

In Excel, groups of cells are called ranges. The cell groups are either contiguous or non-
contiguous. You can name (define) individual cells or ranges, change the size of ranges
after you define them, and use named cells or ranges in formulas. You also can assign a
name to data ranges that are formatted as a table in Excel. The Name Box and the Name
Manager help you keep track of named ranges and their cell addresses. You can also use
the Paste Names command to create a list of named ranges and their addresses in a
worksheet.
Naming Cells and Data Ranges
In Excel, you can assign names to cells, cell ranges, and tables to make it easier to
understand the meaning of formulas that reference these items. For example, if you have
a series of sales figures in a column, instead of referring to them as the range E3:E14, you
can name them SalesQ4. Any time you use the name SalesQ4 in a formula, Excel would
then use the values in those cells.

STEP BY STEP Naming Cells and Data Ranges


GET READY. LAUNCH Excel 2016 if it is not already open.
1. OPEN the 03 Expenses.xlsx workbook from the data files for this lesson.
2. SAVE the workbook as 03 Expenses Solution.xlsx in the lesson folder on your lash
drive.
3. On the Expenses sheet tab, select B4:D15. These are the cells to be named.
4. To the left of the formula bar, click the Name Box.
5. Type a one-word name for the list, such as Q1Expenses, and then press Enter. The
range name appears in the Name Box (Figure 3-1). Excel saves this name and uses it
in any subsequent reference to this range.

Figure 3-1: Using the Name Box to name a range


6. Another way to name a range is to use the New Name dialog box. Select B17:M17.
7. Click the Formulas tab, and then in the Defined Names group, click Define Name.
The New Name dialog box opens (Figure 3-2).
Excel uses the row heading as the suggested range name, shown in the Name text

1 de 6 14/04/2021, 14:32
OneNote https://euc-onenote.officeapps.live.com/o/onenoteframe.aspx?ui=pt-PT&...

box. You can change the name if you like. For this exercise, leave the default name.

Figure 3-2: Using the New Name dialog box to name a range
8. Click the Scope drop-down arrow. Your options are Workbook, Expenses, and
Summary. The last two entries correspond to individual sheets in the workbook.
Close the drop-down list, leaving Workbook selected.
9. In the Comment text box, type Total monthly expenses.
The Refers to text box displays the range you selected. Notice that the sheet name is
also included automatically.
10. Click OK. The name Monthly_Totals is saved for the range B17:M17.
11. A third way to name a range is to use the Create Names from Selection dialog box.
Select N3:N15. This selection includes the column heading label.
12. On the Formulas tab, in the Defined Names group, click Create from Selection. The
Create Names from Selection dialog box appears.
13. Excel determines that you want to use the column heading label as the range name.
Click OK. The range is saved with the name Total.
14. You can assign names to individual cells as well as cell ranges. Select cell N17. To the
left of the formula bar, click the Name Box, type GrandTotal, and then press Enter.
15. Open the Name Box drop-down list. You have four named ranges from which to
select. Press Esc to close the list.
16. SAVE the workbook.
PAUSE. LEAVE the workbook open to use in the next exercise.

Naming ranges or an individual cell according to the data they contain is a time-saving
technique, even though it might not seem so when you work with limited data files in
practice exercises. However, naming a range in a large or complex worksheet enables you
to go to the location quickly, similar to a bookmark. After creating named ranges, you can
select a name in the Name Box drop-down list to select the named range on the
worksheet.
Rules and guidelines for naming ranges include the following:
• Range names can be up to 255 characters in length.
• Range names may begin with a letter, the underscore character (_), or a backslash
(\). The rest of the name may include letters, numbers, periods, and underscore
characters, but not a backslash.
• Range names may not consist solely of the letters “C”, “c”, “R”, or “r”, which are used

2 de 6 14/04/2021, 14:32
OneNote https://euc-onenote.officeapps.live.com/o/onenoteframe.aspx?ui=pt-PT&...

as shortcuts for selecting columns and rows.


• Range names may not include spaces. Microsoft recommends you use the
underscore character (_) or period (.) to separate words.
• Range names cannot be the same as a cell reference, such as Q3 or $B$17.
If you defined a named range after you entered a cell reference in a formula, you might
want to update the existing cell reference to the defined name. Select an empty cell, click
the Define Name drop-down arrow, and then click Apply Names. In the Apply Names
dialog box, click one or more names, and then click OK.

Take Note You can use the same name for equivalent ranges in other worksheets
within a workbook. Include the name of the worksheet in brackets before the range name
to identify which worksheet you’re referring to.

Assigning Names to Tables


A big difference between tables and ordinary data ranges is that a table can be given a
title, so that the table and its columns can be referred to by name instead of by reference
location. Once a table is given a title, all the names of its columns can be used in place of
cell references in a formula. The result is a formula that’s easier to read and even easier to
type.
So, instead of an absolute cell reference such as $B$2:$B$55, you can use a reference
such as Inventory[Sale Price]. Excel already knows not to treat the first row as values, and
whenever records are added to the table, the results of the formula are adjusted without
the formula itself even having to change.
The syntax of a reference to fields in an Excel table is as follows:
TableName[FieldName]

Component Meaning

TableName An arbitrary name you give to a table, in place of its reference as a range.
You can have more than one table on a worksheet, although it might not
always be convenient.
Examples: Customers, Back Orders, Comics Issues
[FieldName] The field name from the header row of the table. The name refers to the
set of all cells that comprise the named column in the table. You do not
need to specify the start and end cell. The field name is always denoted
with [square brackets].
Examples: [Last Name], [Sale Price], [Issue Date]
Excel recognizes four constants that refer to the same general area of a table, which you
may use here when applicable to replace the field name:

Constant Meaning

#All The set of all cells in the table


#Data The set of all cells that contain data, excluding the header row at the top and
any total or subtotal rows that might appear at the bottom

3 de 6 14/04/2021, 14:32
OneNote https://euc-onenote.officeapps.live.com/o/onenoteframe.aspx?ui=pt-PT&...

#Header The set of all cells in the first row in the table
s
#Totals The set of all cells where totals appear, usually the rightmost column of the
table where a SUM function is used
After you begin typing the table or field name, Excel displays a list of names you can add
to the formula (including named ranges). Instead of typing the rest of the name, you can
use the arrow keys on the keyboard to navigate this menu until the name you want (the
table name) is highlighted and then press Tab. The entire name is entered into the
formula, saving you a few seconds of time.
With the table name entered, when it’s time to refer to a field name in the table, you can
start with the left square bracket ( [ ). Excel displays a list of all the field names already in
the table. You use the arrow keys to highlight the one you’re looking for and then press
Tab. Then type the right square bracket ( ] ) to complete the reference and press Enter.
Similarly, whenever you want to use one of the four constants (#All, #Data, #Headers, or
#Totals), you just start with the pound sign #. Excel displays the list and then you
highlight the one you want and press Tab.

Take Note When referring to a field name by name in a formula that’s used inside the
same table as the field name, you can omit the table name. For example, the reference
Customers[City] can be substituted with just City when the reference is inside the
Customers table.

STEP BY STEP Assign a Name to a Table


GET READY. USE the 03 Expenses Solution.xlsx workbook that is open from the
previous exercise.
1. In the Expenses worksheet, select the range A3:N17.
2. Click the Home tab, and then in the Styles group, click Format as Table. In the
gallery of styles, select Blue-Gray, Table Style Medium 12. The Format As Table
dialog box displays.
3. Confirm that the correct range displays in the text box and that My table has
headers is selected (Figure 3-3). Click OK. Excel formats the range as a table, applies
the specified format, and displays filter arrows beside the column headings.

Figure 3-3: Formatting a data range as a table


4. On the Table Tools Design tab, in the Properties group, click the Table Name text
box. Change the default table name to Housing and then press Enter.
You have given a meaningful name to the table (Figure 3-4). Now you can use this

4 de 6 14/04/2021, 14:32
OneNote https://euc-onenote.officeapps.live.com/o/onenoteframe.aspx?ui=pt-PT&...

name in structured references in Excel table formulas, as described in the text that
precedes this exercise.

Figure 3-4: Assigning a new name to the table


5. SAVE the workbook.
PAUSE. LEAVE the workbook open to use in the next exercise.

Managing Named Ranges and Objects


Excel provides a feature called the Name Manager, which helps you work with all of the
names you have assigned to data ranges and tables in a workbook. In the Name Manager
dialog box, you can add, delete, and edit assigned names. You also can sort and filter the
list of names. In addition, you can use the Paste Names command to paste a list of all the
assigned names into a worksheet.

STEP BY STEP Manage Named Ranges and Objects


GET READY. USE the 03 Expenses Solution.xlsx workbook that is open from the
previous exercise.
1. Click the Formulas tab, and then in the Defined Names group, click Name
Manager. The Name Manager dialog box opens. Notice that the list of names
includes names assigned to cells, data ranges, and tables.
2. If the range addresses aren’t fully displayed in the Refers To column, double-click the
divider between the Refers To and Scope columns to resize the column to it the
data (Figure 3-5).

5 de 6 14/04/2021, 14:32
OneNote https://euc-onenote.officeapps.live.com/o/onenoteframe.aspx?ui=pt-PT&...

Figure 3-5: The Name Manager dialog box


3. Click the New button to assign a new name. In the New Name dialog box, change
the Name to Q2Expenses.
4. Click the Collapse Dialog button to the right of the Refers to box, select the range
E4:G15, and then press Enter. Click OK.
5. Repeat steps 3 and 4 to assign the name Q3Expenses to the range H4:J15 and then
assign the name Q4Expenses to the range K4:M15.
6. In the Name Manager, click the name Housing (the name you assigned to the
table), and then click Edit. Change the name to HousingExpenses (one word) and
then click OK. The revised name displays in the Name Manager. Widen the Name
column if necessary.
7. In the Name Manager, click the Filter button. Notice that you can filter the list to
display names scoped to the worksheet or workbook, names with or without errors,
defined names, and table names. Click Defined Names. The HousingExpenses table
name no longer displays.
8. Click the Filter button again and then click Clear Filter. All names are displayed.
Click Close to close the Name Manager.
9. Click cell A20. On the Formulas tab, in the Defined Names group, click the Use in
Formula button, and select Paste Names. The Paste Name dialog box opens.
10. Click the Paste List button. Excel pastes a list of the currently defined names in the
workbook. Click any cell outside the selected range and then compare your results
with Figure 3-6.

Figure 3-6: Use the Paste Names command to display a list of defined names in
a worksheet
11. SAVE the 03 Expenses Solution.xlsx workbook and then CLOSE the workbook.
PAUSE. LEAVE Excel open for the next exercise.

6 de 6 14/04/2021, 14:32

You might also like