Excel Lesson 04
Excel Lesson 04
4
LESSON SKILL MATRIX
Skills Exam Objective Objective Number
Understanding and Displaying Formulas Display formulas. 1.4.8
Using Cell References in Formulas Insert references. 4.1.1
Using External Cell References Insert references. 4.1.1
SOFTWARE ORIENTATION
Excel enables you to create many formulas by simply typing in a cell or using your mouse pointer
to select cells to include in a formula. For example, you can create basic formulas for addition,
subtraction, multiplication, and division using these methods. However, as you have discovered in
previous lessons, the user interface offers tools that make it easier to work with data. In this lesson,
you use a few command groups on the Formulas tab to display formulas and name ranges to be
used in formulas.
Name box Formula bar View and edit named ranges Define Name Create from Selection Show Formulas
Figure 4-1
The Formulas tab
in Excel 2016
Use Figure 4-1 as a reference throughout this lesson as you become familiar with some of the com-
mand groups on the Formulas tab and use them to work with formulas. You learn about additional
commands on the Formulas tab in the next lesson, which addresses functions.
49
50 Lesson 4
GET READY. Before you begin these steps, LAUNCH Microsoft Excel and then OPEN a new
blank workbook.
1. Click cell A1.
2. Type =7+8*3/2-4 and press Enter. You just entered a formula.
Take Note Formulas should be typed without spaces, but if you type spaces, Excel eliminates them when you
press Enter.
3. Click cell A1. Notice that the result of the formula displays in the cell, but the formula
itself appears in the formula bar (see Figure 4-2).
Figure 4-2
Viewing a formula in the
formula bar
4. Double-click cell A1. The formula appears in both the active cell and the formula bar.
You can edit the formula in this mode.
5. Press Enter.
6. On the Formulas tab, in the Formula Auditing group, click Show Formulas. The formula
in cell A1 displays.
Take Note While you are displaying formulas in the worksheet, you will not see the results of those formulas.
Take Note You can begin a formula with a plus (+) sign or a minus (−) sign as the beginning calculation opera-
tor, but Excel changes it to an equal sign when you press Enter. Excel doesn’t recognize a construct
like 3+4= as a legitimate formula. Excel treats it like an ordinary string of characters.
Using Basic Formulas 51
Excel uses four types of calculation operators: arithmetic, comparison, text concatenation, and
reference. This lesson covers several arithmetic operators and the equal sign, which is a comparison
operator. The arithmetic operators are listed in Table 4-1.
Table 4-1
Arithmetic Name Calculation Example
Excel Arithmetic Operators Operator
Negation –5
When you build a formula, it appears in the formula bar and in the cell itself. When you complete
the formula and press Enter, the value displays in the cell and the formula displays in the formula
bar if you select the cell. You can edit a formula in the cell or in the formula bar the same way you
can edit any data entry.
When you click the Show Formulas button on the Formulas tab, all formulas in your worksheet
display. Click the Show Formulas button again to toggle off display of formulas.
Figure 4-3
Parentheses added to the
formula
6. SAVE the workbook in your Excel Lesson 4 folder as 04 Order of Operations Solution
and CLOSE it.
Excel applies the rules of mathematics to determine how formulas are calculated. The following is
the order in which arithmetic operators are applied:
7 + 8 * 3 / 2 − 4 = 15
Following arithmetic operator priorities, the first operation is 8 multiplied by 3 and that result is
divided by 2. Then 7 is added and 4 is subtracted.
You can use parentheses in a formula to override the standard order of operations. Excel per-
forms calculations on formulas inside parentheses first. Parentheses inside of parentheses are called
nested parentheses. Calculations are performed on formulas in the innermost set of paren-
theses first, and from left to right if nested parentheses are at the same level. Therefore, the result
of the following formula with parentheses is different from the previous one:
Following arithmetic operator priorities, the first operation is the sum of 7 + 8 multiplied by the
quotient of 3 divided by 2. Then, 4 is subtracted.
Take Note While modifying a complex formula, if you decide to revert back to the original formula and start
over, just press Esc. If you’ve already pressed Enter, you’ll need to click the Undo button on the
Quick Access Toolbar.
GET READY. OPEN the 04 Budget Cell References data file for this lesson.
1. Click cell B18.
2. Click in the formula bar and replace 1200 with B3. Notice that cell B3 is highlighted and
surrounded by a blue border while you’re modifying the formula (see Figure 4-4).
Using Basic Formulas 53
Figure 4-4
Entering a relative cell Entering a relative
reference cell reference
Take Note You can use either uppercase or lowercase when you type a cell reference in a formula. For ex-
ample, it does not matter whether you type B4 or b4 in the formula you enter. Excel changes the
reference to uppercase when you press Enter.
3. Press Enter. The formula in cell B18 now uses a relative cell reference to cell B3.
4. Copy cell B18 to cell B21. The displayed result changes to 400.
5. Notice in the formula bar that the formula in cell B21 is =B6+500-100, but the formula
you copied is =B3+500-100. That’s because the original cell reference of cell B3
changed to cell B6 when you copied the formula down three cells, and cell B6 is blank.
The cell reference is adjusted relative to its position in the worksheet.
6. An alternate way to use a cell reference is to click the cell being referenced while
creating or modifying a formula. With cell B21 still active, click in the formula bar and
select B6.
7. Click cell B3. Cell B3 becomes highlighted and surrounded by a blue dashed border,
and cell B3 appears in the formula bar rather than cell B6. Press Enter.
8. SAVE the workbook in your Excel Lesson 4 folder as 04 Budget Cell References
Solution.
You use relative cell references when you want the reference to automatically adjust when you copy
or fill the formula across rows or down columns in ranges of cells. By default, new formulas in
Excel use relative references.
In this exercise, you learn two methods for creating formulas using relative references:
You can also reference a range of cells in a formula, which you learn about later in this lesson.
Cell referencing raises another important point about Excel. When you perform math on a series
of numbers on paper, they’re usually right next to each other in a column or a single row. In a
worksheet, the numbers don’t have to be adjacent: You can create formulas that reference cells
anywhere in the worksheet.
54 Lesson 4
Take Note When constructing a worksheet, plan on using relative cell references unless you know there will
be a reason not to adjust the cell identifier when you insert or delete columns and rows.
GET READY. USE the worksheet you modified in the previous exercise.
1. Click cell B18.
2. Click in the formula bar and insert dollar signs in the B3 cell reference so it looks like
$B$3.
3. Press Enter. The formula in cell B18 now uses an absolute cell reference to cell B3.
4. Copy cell B18 to cell B21. The displayed result is 1600, which matches B18.
5. Copy cell B21 to cell C21. The displayed result is still 1600.
6. Notice in the formula bar that the formulas in cells B21 and C21 are =$B$3+500-100.
Figure 4-5 shows the formula for cell C21. Regardless of where you copy the formula in
the worksheet, the formula still refers to cell B3.
Figure 4-5
An absolute cell reference
An absolute cell reference refers to a specific cell or range of cells regardless of where the
formula is located in the worksheet. Absolute cell references include two dollar signs in the formu-
la, preceding the column letter and row number. The absolute cell reference $B$3, for example,
always refers to column (B) and row (3). When you copy the formula to any other cell in the
worksheet, the absolute reference will not adjust to the destination cells.
Using Basic Formulas 55
GET READY. USE the worksheet you modified in the previous exercise.
1. Click cell B21.
2. Click in the formula bar and delete the dollar sign before 3 in the formula so it looks like
$B3.
3. Press Enter. The formula in cell B21 now uses a mixed cell reference.
4. Copy cell B21 to cell C22. The displayed result is 440, which is different from the result
in B21. That’s because the formula in C22 references cell B4 (see Figure 4-6). The dollar
sign before the B in the formula is absolute, but the row number is relative.
Figure 4-6
A mixed cell reference
5. Delete the contents of cell B21, cell C21, and cell C22.
6. SAVE the workbook.
A mixed cell reference is a cell reference that uses an absolute column or row reference, but
not both.
In the exercise, the column portion of the cell reference is absolute and remains unchanged in the
formula regardless of where the formula is copied. The row portion of the formula is relative (no
dollar sign precedes the row number of 3), so that part of the cell reference changes when the cell
is copied.
56 Lesson 4
If you copy a formula across rows or down columns, the relative reference automatically adjusts,
and the absolute reference does not adjust. For example, when you copied the formula contain-
ing the mixed reference $B3 to a different cell in column C, the reference in the destination cell
changed to $B4. The column reference remained the same because that portion of the formula is
absolute. The row reference adjusted because it is relative.
GET READY. USE the worksheet you modified in the previous exercise.
1. Click the Summary sheet tab in the 04 Budget Cell References Solution workbook.
2. Click cell D8. You want the average payment for electricity to appear in this cell, similar
to the content that appears in B20 in the Expense Details worksheet. However, your
formula must reference the Expense Details worksheet to gather the data.
3. Type =SUM(‘Expense Details’!N8)/12 and press Enter. This formula divides the value
of cell N8 in the Expense Details worksheet by 12. The result is 176, rounded due to cell
formatting applied to the worksheet (see Figure 4-7).
Figure 4-7
Creating a link to a worksheet
in the same workbook
The formula includes a
reference to the Expense
Details worksheet,
which is in the same
workbook as the
Summary worksheet.
You can also refer to a range of cells in an external worksheet. For example, in the exercise, you
can use a similar formula, =SUM(‘Expense Details’!B8:M8)/12, to accomplish the same task. This
formula adds the values in the range B8:M8 and then divides them by 12 to produce the average
monthly payment for electricity over one year.
Microsoft calls references to cells in another worksheet or in another workbook links because you
are essentially linking to data in those remote locations.
GET READY. USE the worksheet you modified in the previous exercise.
1. Open a second workbook, the workbook file named 04Budget2016.
2. Return to the 04 Budget Cell References Solution workbook. On the Summary sheet,
click cell C3.
3. Type =([04Budget2016.xlsx]Summary!B3) as shown in Figure 4-8, and press Enter. The
formula links to cell B3 on the Summary sheet in the workbook named 04Budget2016.
Figure 4-8
An external reference to a cell
The formula includes an
in another workbook external reference to the
Summary worksheet in
the 04Budget2016
workbook
The paired brackets [ ] identify the name of the workbook file, and Summary! identifies the work-
sheet within that file.
58 Lesson 4
Naming a Range
When you refer to the same cell range over and over, it might be more convenient to give it a name.
Excel recognizes the name as the cell range and uses the values in those cells to do what you spec-
ified. For instance, if you have a series of sales figures in a column, instead of referring to them as
the range C4:C10, you can name them SalesQ3. Any time you use the name SalesQ3 in a formula,
Excel would then use the values in those cells.
GET READY. OPEN the 04 Budget Ranges data file for this lesson.
1. Click Enable Content, if prompted. If you see another message box, click Continue.
Click Yes if prompted to make the file a Trusted Document. Click the Expense Details
sheet tab.
2. Select B3:D14. These are the cells to be named.
3. To the left of the formula bar, click the Name Box.
4. 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 4-9). Excel saves this name and uses
it in any subsequent reference to this range.
The range name appears in the Name Box The highlighted cells that are part of the range
Figure 4-9
Using the Name Box to name
a range
5. An alternative way to name a range is to use the New Name dialog box. Select
B16:M16.
6. On the Formulas tab, in the Defined Names group, click Define Name. The New Name
dialog box appears (see Figure 4-10).
7. Excel uses the row heading as the range name, shown in the Name text box. You can
change the name if you like. For this exercise, leave the default name.
8. Open the Scope drop-down list. Your options are Workbook, Expense Details, and
Summary. The last two entries correspond to individual sheets in the workbook. Close
the drop-down list, leaving Workbook selected.
Using Basic Formulas 59
Figure 4-10
Using the New Name dialog box
to name a range
As you learned in Lesson 2, a range is a group of adjacent cells that you select to perform opera-
tions on all of the selected cells. You refer to a cell range by separating the first and last cell in the
range by a colon, such as B1:B9 and D4:G9.
A named range is a group of cells, and occasionally a single cell, with a designated name. The
most common reason to name a range is to refer to it in formulas and functions. 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 selecting a range of cells, you can name the range using three different methods:
• Range names may not include spaces. Microsoft recommends you use the underscore character
(_) or period (.) to separate words, such as Fruit_List and Personal.Budget.
• Range names cannot be the same as a cell reference, such as A7 or $B$3.
All names have a scope, either to a specific worksheet or to the entire workbook. The scope of a
name is the location within which Excel recognizes the name without qualification. Excel requires
that a name must be unique within its scope, but you can use the same name in different scopes.
In the New Name dialog box, if you select a worksheet name from the Scope list, the scope is at
the local worksheet level. If you select Workbook, the scope is at the global workbook level.
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 click Apply Names. In the Apply Names dialog box, click one or more names,
and 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.
After creating named ranges, you can select a name in the Name Box drop-down list to select the
named range on the worksheet.
GET READY. USE the worksheet you modified in the previous exercise.
1. In the Expense Details sheet, click A21.
2. Type First Quarter Expenses and then press Enter.
3. In cell B21, type =SUM(.
4. On the Formulas tab, in the Defined Names group, click Use in Formula.
5. Select Q1Expenses from the list (see Figure 4-11), type ) to close the formula and then
press Enter. The total amount of expenses for January through March appears in
cell B21.
Figure 4-11
Using a named range in a
formula
CLOSE Excel.
Using Basic Formulas 61
Knowledge Assessment
Multiple Choice
Select the best response for the following statements.
1. Which of the following is not an arithmetic operator?
a. +
b. −
c. *
d. ]
2. Per the order of operations, which of the following is calculated first?
a. Addition (+) and subtraction (−) (left to right)
b. Exponentiation (ˆ)
c. Percent (%)
d. Negative number (−)
3. Which of the following is an acceptable name for a named range?
a. C7
b. subtotal_west
c. subtotal west
d. subtotal/west
4. Which of the following is an example of an absolute cell reference?
a. A9
b. A$9
c. $A$9
d. A9:E9
5. Which of the following is an example of a mixed cell reference?
a. A9
b. A$9
c. $A$9
d. A9:E9
True / False
Circle T if the statement is true or F if the statement is false.
T F 1. To allow Excel to distinguish formulas from data, all formulas begin with an
equal sign (=).
T F 2. Regarding a named range, the scope of a name is the location within which
Excel recognizes the name without qualification.
T F 3. You can create a new range by selecting the cells and typing a name in the
Name Box next to the formula bar.
T F 4. The order of operations determines which parts of a formula are calculated
before other parts of the formula.
T F 5. The formula = 6 * 2 / 3 produces the same result as = 6 * (2 / 3).
62 Lesson 4
Projects
GET READY. Before you begin these steps, LAUNCH Excel and OPEN the 04 Project
Operations Practice workbook.
1. Select C3 and then modify the formula by inserting parentheses around 5+2. Press
Enter. The new formula should be =(5+2)*8. The value in C3 changes from 21 to 56.
2. Select D2. Click in the formula bar and then place parentheses around 65–29. Press
Enter. The new formula should be =(65–29)*8+97/5. The value in D2 changes from
−147.6 to 307.4.
3. Select D2. Click in the formula bar and then place parentheses around 97/5. Press
Enter. The new formula should be =(65–29)*8+(97/5). The value in D2 remains the same
at 307.4.
4. Select D2. Click in the formula bar and then change the parentheses so the formula
looks like =(65–(29*8)+97)/5. Press Enter. The value in D2 changes to –14.
5. SAVE the workbook in your Excel Lesson 4 folder as 04 Project Operations Solution
and then CLOSE it.
CLOSE Excel.