Msofficeintro Excel B Working With Formulas and Functions
Msofficeintro Excel B Working With Formulas and Functions
ng
perform some what-if analysis, to see what quarterly expenses would look like with various pro-
ni
jected increases.
ar
Le
ge
Unit Objectives
ga
cell references
er
cell references
ng
The Totals tab in the Quick Analysis tool displays commonly used functions, as seen in Figure B-1.
3. Click the AutoSum button in the Quick Analysis tool
ni
The newly calculated value displays in cell B12 and has a darker appearance than the figures in the
ar
selected range.
Le
4. Click cell B12, then drag the fill handle to cell E12
The formula in cell B12 is copied to cells C12:E12. The copied cells have the same dark appearance as that
ge
of cell B12.
QUICK TIP 5. Click cell B14, type =, click cell B12, then type +
ga
When the mode In this first part of the formula, you are using a reference to the total expenses for Quarter 1.
indicator on the
en
8. Press [Tab], type =, click cell C12, type +, click cell C12, type *.2, then click
er
QUICK TIP
You can also copy The result, 41352.912, appears in cell C14.
op
the formulas by
selecting the range 9. Drag the fill handle from cell C14 to cell E14
Pr
C14:E14, clicking the The calculated values appear in the selected range, as shown in Figure B-2. Dragging the fill handle on a cell
Fill button in the
copies the cell’s contents or continues a series of data (such as Quarter 1, Quarter 2, etc.) into adjacent cells.
Editing group on the
HOME tab, then This option is called Auto Fill.
clicking Right.
10. Save your work
Totals tab
ng
Mode indicator
ni
ar
FIGURE B-2: Complex formulas in worksheet
Le
ge
ga
en
C
Excel 2013
of
ty
er
op
Pr
ng
When using the
Insert Function button
quarter. You want to use the Insert Function dialog box to enter this function.
ni
or the AutoSum list 2. Click the Insert Function button on the formula bar
arrow, it is not
ar
necessary to type the An equal sign ( = ) is inserted in the active cell and in the formula bar, and the Insert Function dialog box
equal sign (=); Excel opens, as shown in Figure B-3. In this dialog box, you specify the function you want to use by clicking it
Le
adds it as necessary. in the Select a function list. The Select a function list initially displays recently used functions. If you
don’t see the function you want, you can click the Or select a category list arrow to choose the desired
QUICK TIP
ge
category. If you’re not sure which category to choose, you can type the function name or a description
To learn about a
in the Search for a function field. The AVERAGE function is a statistical function, but you don’t need to
ga
function, click it in
the Select a function open the Statistical category because this function already appears in the Most Recently Used category.
list. The arguments
en
and format required 3. Click AVERAGE in the Select a function list if necessary, read the information that
for the function appears under the list, then click OK
C
QUICK TIP 4. Click the Collapse button in the Number1 field of the Function Arguments dialog
When selecting a
box, select the range B4:B11 in the worksheet, then click the Expand button in the
ty
range, remember to
select all the cells Function Arguments dialog box
er
between and includ Clicking the Collapse button minimizes the dialog box so you can select cells in the worksheet. When you click
ing the two refer
op
ences in the range. the Expand button, the dialog box is restored, as shown in Figure B-4. You can also begin dragging in the work-
sheet to automatically minimize the dialog box; after you select the desired range, the dialog box is restored.
Pr
5. Click OK
The Function Arguments dialog box closes, and the calculated value is displayed in cell B15. The average
expenses per country for Quarter 1 is 4353.0788.
6. Click cell C15, click the AutoSum list arrow in the Editing group on the HOME tab,
then click Average
A ScreenTip beneath cell C15 displays the arguments needed to complete the function. The text “number1”
is shown in boldface type, telling you that the next step is to supply the first cell in the group you want to
average. You want to average a range of cells.
7. Select the range C4:C11 in the worksheet, then click the Enter button on the formula bar
The average expenses per country for the second quarter appears in cell C15.
8. Drag the fill handle from cell C15 to cell E15
The formula in cell C15 is copied to the rest of the selected range, as shown in Figure B-5.
9. Save your work
Excel 28 Working with Formulas and Functions
FIGURE B-3: Insert Function dialog box
Search for a
function field
Or select a
category list arrow
Your list of recently used
functions may differ
Description of
selected function
ng
FIGURE B-4: Expanded Function Arguments dialog box
ni
ar
Le
Function in
formula bar AutoSum list
arrow
ge
Drag title bar
of dialog box
ga
to move it if
Insert Function necessary
en
button
Argument
Collapse button
C
Excel 2013
Description of function
of
and arguments
ty
er
op
Completed function
appears in formula bar
ng
feature. This feature minimizes the amount of typing you need to do to enter a function and reduces typing
and syntax errors.
ni
2. Click MAX in the list
ar
Clicking any function in the Formula AutoComplete list opens a ScreenTip next to the list that describes
Le
the function.
3. Double-click MAX
ge
The function is inserted in the cell, and a ScreenTip appears beneath the cell to help you complete the
ga
formula. See Figure B-6.
4. Select the range B4:B11, as shown in Figure B-7, then click the Enter button on the
en
formula bar
The result, 7195.06, appears in cell B16. When you completed the entry, the closing parenthesis was
C
5. Click cell B17, type =, type m, then double-click MIN in the list of function names
ty
7. Select the range B16:B17, then drag the fill handle from cell B17 to cell E17
Pr
The maximum and minimum values for all of the quarters appear in the selected range, as shown in Figure B-8.
8. Save your work
ng
ni
ar
Le
ge
ga
en
C
Excel 2013
of
ng
the cell that you
want to cut or copy. 2. Click the dialog box launcher in the Clipboard group
ni
The Office Clipboard opens in the Clipboard task pane, as shown in Figure B-9. When you copy or cut an
ar
item, it is cut or copied both to the Clipboard provided by Windows and to the Office Clipboard. Unlike the
Windows Clipboard, which holds just one item at a time, the Office Clipboard contains up to 24 of the
Le
most recently cut or copied items from any Office program. Your Clipboard task pane may contain more
items than shown in the figure. ge
QUICK TIP 3. Click cell B19, then click the Paste button in the Clipboard group
Once the Office
ga
A copy of the contents of range B3:E3 is pasted into the range B19:E19. When pasting an item from the
Clipboard contains
24 items, the oldest Office Clipboard or Clipboard into a worksheet, you only need to specify the upper-left cell of the range
en
existing item is auto where you want to paste the selection. Notice that the information you copied remains in the original range
matically deleted B3:E3; if you had cut instead of copied, the information would have been deleted from its original location
C
4. Press [Delete]
The selected cells are empty. You have decided to paste the cells in a different row. You can repeatedly paste
ty
an item from the Office Clipboard as many times as you like, as long as the item remains in the Office
er
Clipboard.
op
QUICK TIP 5. Click cell B20, click the first item in the Office Clipboard, then click the Close button on
You can also close
the Office Clipboard
the Clipboard task pane
Pr
Paste button
Copy button
Clipboard dialog
box launcher
Item in
Office
Clipboard
ng
ni
ar
Cell contents
Le
being copied
Indicates new
ge
location of copy
ga
Excel 2013
of
ty
Formula calculates
er
30% increase
op
Pr
ng
• Use relative references when you want to preserve the relationship to the
ni
formula location
ar
When you create a formula that references another cell, Excel normally does not “record” the exact cell
Le
address for the cell being referenced in the formula. Instead, it looks at the relationship that cell has to the
cell containing the formula. For example, in Figure B-12, cell F5 contains the formula: =SUM(B5:E5). When
Excel retrieves values to calculate the formula in cell F5, it actually looks for “the four cells to the left of the
ge
formula,” which in this case is cells B5:E5. This way, if you copy the cell to a new location, such as cell F6,
ga
the results will reflect the new formula location, and will automatically retrieve the values in cells B6, C6,
D6, and E6. These are relative cell references, because Excel is recording the input cells in relation to or
en
default. In Figure B-12, the formulas in F5:F12 and in B13:F13 contain relative cell references. They total the
“four cells to the left of” or the “eight cells above” the formulas.
of
• Use absolute cell references when you want to preserve the exact cell address in
ty
a formula
er
There are times when you want Excel to retrieve formula information from a specific cell, and you don’t
want the cell address in the formula to change when you copy it to a new location. For example, you might
op
have a price in a specific cell that you want to use in all formulas, regardless of their location. If you use
Pr
relative cell referencing, the formula results would be incorrect, because Excel would use a different cell
every time you copy the formula. Therefore you need to use an absolute cell reference, which is a refer-
ence that does not change when you copy the formula.
You create an absolute cell reference by placing a $ (dollar sign) in front of both the column letter and
the row number of the cell address. You can either type the dollar sign when typing the cell address in a
formula (for example, “=C12*$B$16”), or you can select a cell address on the formula bar and then press [F4]
and the dollar signs are added automatically. Figure B-13 shows formulas containing both absolute and
relative references. The formulas in cells B19 to E26 use absolute cell references to refer to a potential sales
increase of 50%, shown in cell B16.
Formula containing
relative references
ng
ni
ar
FIGURE B-13: Formulas containing absolute and relative references
Le
ge
ga
en
C
Excel 2013
of
ty
Absolute references in
copied formulas do
er
Relative references in
copied formulas adjust
to the new location
ng
that the formula =B12*1.3 appears in the formula bar, and a moving border surrounds the active cell.
ni
QUICK TIP 2. Click cell C21, then click the Paste button (not the list arrow) in the Clipboard group
ar
To paste only specific The formula from cell B21 is copied into cell C21, where the new result of 44798.988 appears. Notice in the
components of a
formula bar that the cell references have changed, so that cell C12 is referenced in the formula. This formula
Le
copied cell or range,
click the Paste list contains a relative cell reference, which tells Excel to substitute new cell references within the copied formu-
arrow in the Clipboard las as necessary. This maintains the same relationship between the new cell containing the formula and the
ge
group, then click
Paste Special. You
cell references within the formula. In this case, Excel adjusted the formula so that cell C12—the cell
can selectively copy reference nine rows above C21—replaced cell B12, the cell reference nine rows above B21.
ga
formats, formulas,
values, comments, 3. Drag the fill handle from cell C21 to cell E21
en
validation rules, trans A formula similar to the one in cell C21 now appears in cells D21 and E21. After you use the fill handle to
pose columns and copy cell contents, the Auto Fill Options button appears, as seen in Figure B-14. You can use the Auto
C
5. Click in the Clipboard group, select the range F5:F6, then click the Paste button
er
See Figure B-15. After you click the Paste button, the Paste Options button appears, which you can use
op
to paste only specific elements of the copied selection if you wish. The formula for calculating total expenses
for tours in Britain appears in the formula bar. You would like totals to appear in cells F7:F11. The Fill button
Pr
in the Editing group can be used to copy the formula into the remaining cells.
6. Select the range F6:F11
7. Click the Fill button in the Editing group, then click Down
The formulas containing relative references are copied to each cell. Compare your worksheet to Figure B-16.
8. Save your work
Paste button
ng
ni
FIGURE B-16: Formula copied using Fill Down
ar
Le
ge
Fill button
ga
en
Filled cells
C
Excel 2013
of
ty
You can selectively copy formulas, values, or other choices using is shown in the worksheet. Options include pasting values only,
op
the Paste list arrow, and you can see how the pasted contents will pasting values with number formatting, pasting formulas only,
look using the Paste Preview feature. When you click the Paste list pasting formatting only, pasting transposed data so that column
Pr
arrow, a gallery of paste option icons opens. When you point to an data appears in rows and row data appears in columns, and past
icon, a preview of how the content will be pasted using that option ing with no borders (to remove any borders around pasted cells).
ng
You store the increase factor that will be used in the what-if analysis in this cell (G2). The value 1.1 can be
ni
used to calculate a 10% increase: anything you multiply by 1.1 returns an amount that is 110% of the
ar
original amount.
3. Click cell H3, type What if?, then press [Enter]
Le
4. In cell H4, type =, click cell F4, type *, click cell G2, then click the Enter button
ge on the
formula bar
The result, 28250.1, appears in cell H4. This value represents the total annual expenses for Australia if there
ga
QUICK TIP is a 10% increase. You want to perform a what-if analysis for all the tour countries.
Before you copy or
5. Drag the fill handle from cell H4 to cell H11
en
move a formula,
always check to The resulting values in the range H5:H11 are all zeros, which is not the result you wanted. Because you used
C
formula to keep the formula from adjusting itself. That way, it will always reference cell G2.
ty
QUICK TIP 6. Click cell H4, press [F2] to change to Edit mode, then press [F4]
When changing a
er
When you press [F2], the range finder outlines the arguments of the equation in blue and red. The insertion
cell reference to an
point appears next to the G2 cell reference in cell H4. When you press [F4], dollar signs are inserted in the
op
absolute reference,
make sure the refer G2 cell reference, making it an absolute reference. See Figure B-17.
ence is selected or
Pr
the insertion point is 7. Click , then drag the fill handle from cell H4 to cell H11
next to it in the cell Because the formula correctly contains an absolute cell reference, the correct values for a 10% increase
before pressing [F4].
appear in cells H4:H11. You now want to see what a 20% increase in expenses looks like.
8. Click cell G2, type 1.2, then click
The values in the range H4:H11 change to reflect the 20% increase. Compare your worksheet to Figure B-18.
9. Save your work
Absolute cell
reference in formula
ng
ni
ar
FIGURE B-18: What-if analysis with modified change factor
Le
ge
ga
Modified change
factor
en
C
Excel 2013
of
ty
er
op
Pr
ng
Formula AutoComplete displays a list of functions beginning with RO beneath the formula bar.
dialog box, the
ROUND function is 3. Double-click ROUND in the functions list
ni
in the Math & Trig
The new function and an opening parenthesis are added to the formula, as shown in Figure B-19. A few
ar
category.
additional modifications are needed to complete your edit of the formula. You need to indicate the number
Le
of decimal places to which the function should round numbers and you also need to add a closing
parenthesis around the set of arguments that comes after the ROUND function.
ge
TROUBLE 4. Press [END], type ,0), then click the Enter button on the formula bar
If you have too The comma separates the arguments within the formula, and 0 indicates that you don’t want any decimal
ga
many or too few
parentheses, the places to appear in the calculated value. When you complete the edit, the parentheses at either end of the
extraneous paren formula briefly become bold, indicating that the formula has the correct number of open and closed
en
dialog box opens 5. Drag the fill handle from cell B14 to cell E14
with a suggested
The formula in cell B14 is copied to the range C14:E14. All the values are rounded to display no decimal
of
6. Scroll down so row 25 is visible, click cell A25, type your name, then click on the
formula bar
er
7. Save your work, preview the worksheet in Backstage view, then submit your work to
op
8. Exit Excel
Screentip indicates
needed arguments
ng
ni
ar
Function surrounds
Le
existing formula
ge
ga
en
Calculated values
C
with no decimals
Excel 2013
of
ty
er
time when you create common documents such as balance new file in the default format, it has the regular .xlsx extension.
Pr
sheets, budgets, or time cards. Templates contain labels, values, To save a workbook of your own as a template, open the Save As
formulas, and formatting, so all you have to do is customize them dialog box, click the Save as type list arrow, then change the file
with your own information. Excel comes with many templates, type to Excel Template.
and you can also create your own or find additional templates on
the Web. Unlike a typical workbook, which has the file extension FIGURE B-21: Expense Trends template selected in Backstage view
.xlsx, a template has the extension .xltx. To create a workbook
using a template, click the FILE tab, then click New on the
navigation bar. The New pane in Backstage view lists templates
available through Office.com. The Blank workbook template is
selected by default and is used to create a blank workbook with
no content or special formatting. A preview of the selected
template appears in a separate window on top of the New pane.
To select a template, click one of the selections in the New pane,
then click Create. Figure B-21 shows an Office.com template.
(Your list of templates may differ.) When you click Create, a new