Naming Cells and Data Ranges In Excel, you can assign names to cells, cell ranges, and tables to make it easier to understand the

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.

64 Lesson 3

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 file for this exercise.

2. SAVE the workbook as

03 Expenses Solution.xlsx .

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 (see 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 (see Figure 3-2).

Excel uses the row heading as the suggested range name, shown in the Name text 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. Open the Scope drop-down list. 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 .

65 The Refers to text box displays the range you selected. Notice that the sheet name is

Using Advanced Functions and Analyzing Data

also included automatically.

10. Click OK . The name Monthly_Subtotals 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 N16 . 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 quick- ly, 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 as short- cuts 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 arrow next to Define Name, 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 it 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 Inven- tory[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.

66 Lesson 3

The syntax of a reference to fields in an Excel table is as follows: TableName[FieldName]

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:

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

#Headers

The set of all cells in the first row in the table

#Totals

The set of all cells where totals appear, usually the rightmost column of the table where a SUM function is employed

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 high- lighted 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.

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 substitut-

ed with just City when the reference is inside the Customers table.

STEP BY STEP

Assign a Name to a Table

GET READY . LAUNCH Excel 2016 if it is not already open.

1. OPEN the

03 Expenses Solution.xlsx workbook from the previous exercise, if you

closed it.

2. In the Expenses worksheet, select the range A3:N17 .

Using Advanced Functions and Analyzing Data

3. Click the Home tab and then in the Styles group, click Format as Table . In the gallery of styles, select Table Style Medium 12 . The Format As Table dialog box displays.

4. Confirm that the correct range displays in the text box, and that My table has headers is selected (see 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

5. 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 (see Figure 3-4). Now you can use this 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

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

Dokumen yang terkait

Analisis Komparasi Internet Financial Local Government Reporting Pada Website Resmi Kabupaten dan Kota di Jawa Timur The Comparison Analysis of Internet Financial Local Government Reporting on Official Website of Regency and City in East Java

19 819 7

Analisis Komposisi Struktur Modal Pada PT Bank Syariah Mandiri (The Analysis of Capital Structure Composition at PT Bank Syariah Mandiri)

23 288 6

Improving the Eighth Year Students' Tense Achievement and Active Participation by Giving Positive Reinforcement at SMPN 1 Silo in the 2013/2014 Academic Year

7 202 3

An Analysis of illocutionary acts in Sherlock Holmes movie

27 148 96

Improping student's reading comprehension of descriptive text through textual teaching and learning (CTL)

8 140 133

Teaching speaking through the role play (an experiment study at the second grade of MTS al-Sa'adah Pd. Aren)

6 122 55

Enriching students vocabulary by using word cards ( a classroom action research at second grade of marketing program class XI.2 SMK Nusantara, Ciputat South Tangerang

12 142 101

The Effectiveness of Computer-Assisted Language Learning in Teaching Past Tense to the Tenth Grade Students of SMAN 5 Tangerang Selatan

4 116 138

Analysis On Students'Structure Competence In Complex Sentences : A Case Study at 2nd Year class of SMU TRIGUNA

8 98 53

The correlation between listening skill and pronunciation accuracy : a case study in the firt year of smk vocation higt school pupita bangsa ciputat school year 2005-2006

9 128 37