chapter 2 formulas and functions
TRANSCRIPT
Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall. 1
by Mary Anne Poatsy, Keith Mulbery, Lynn Hogan, Amy Rutledge, Cyndi Krebs, Eric Cameron, Rebecca Lawson
Chapter 2
Formulas and Functions
• Excel offers 3 types of cell REFERENCES for use
when a formula is COPIED
– ABSOLUTE $A$1
– RELATIVE A1
– MIXED $ A1 or A $ 1
• $ indicates that the ROW NUMBER or COLUMN
LETTER will NOT be modified during a copy
2
Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
•F4 key toggles
between the
different types
• A relative cell reference (default) indicates a cell’s
relative location from the cell containing the formula.
3Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
• An absolute cell reference provides a permanent
reference to a specific cell
– Absolutely will NOT change when COPIED
4Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
• In mixed reference $B4, the column (“B ”) is
fixed, but the row (“4 ”) may be altered during a
copy
• In mixed reference B$4, the row (“4 ”) is fixed,
but the column (“B ”) may be altered during a copy
5Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
• A circular referenceerror occurs if a formula
refers to itself
6Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
• An Excel function is a predefined formula that
performs a calculation
7Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
• Syntax is the set of rules that govern correct
formation of a function (order of items, comma,
brackets, spaces, etc.)
• An argument is an input, such as a cell or range
• A function begins with the equal sign (=)
followed by the function NAME and arguments
in parentheses
Example: =SUM(A1:A3)
8Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
• When a function is typed, Formula AutoComplete
displays a list of functions matching the partialentry
9Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
• A function ScreenTip is a small pop-up description
that displays the function arguments.
10Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
• Use the Insert Function dialog box to search for a
function or select one from a list
11Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
• The Function Arguments dialog box offers HELP
on each argument
12Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
• The SUM function returns the mathematical
sum of some number of cells or ranges; for
example:
=SUM(A1:A3)
=SUM(A1,B3,C5)
=SUM(A1:B3,C5:E8)
13Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
• Common STATISTICAL functions include:
– AVERAGE arithmetic mean
– MEDIAN midpoint value
– MIN minimum value
– MAX maximum value
– COUNT number of values in a range
– COUNTBLANK number of empty cells
– COUNTA number of NONempty cells
14Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
15Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
16Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
=FREQUENCY(Number)
17
• Returns how often values occur within a set of data
NAME TEST SCORE INTERVALS
Jordan 80 59
Lisa 75 69
Jason 90 79
Peter 62 89
Kayla 83
Kim 55
Frank 76
Lilly 93
Jose 58
{=FREQUENCY(B2:B12,C2:C5)}into cells D2:D6
The 1st value in the array would display in cell D2. The result would be 2(because there are 2 Test Scores <= 59).
The 2nd value in the array would display in cell D3. The result would be 1 (because there is 1 Test Score between 60 and 69).
The 3rd value in the array would display in cell D4. The result would be 2 (because there are 2 Test Scores between 70 and 79).
• An Excel ARRAY FORMULA performs
MULTIPLE calculations on 1 or more sets of
values (the 'array arguments') and returns 1 or more
results.
• SELECT the RANGE of cells that you want to
input your ARRAY FORMULA into
• The selection should contain 1 CELL MORE than
the number of values in your ARRAY (For example,
if the bins array contains 4 values, select 5 cells.)
18Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
• Enter the formula into the 1st cell of the range
• Press CTRL-SHIFT-ENTER
• Excel automatically places curly braces { }
around array formulas
• Do NOT type the curly braces in yourself,
(Excel will not interpret your formula as an
array formula.)
19
=RANK
RANK(number,ref,[order])
20
Returns the rank of a number in a list of numbers
The RANK function syntax has the following arguments:•Number Required. The number whose rank you want to find.•Ref Required. An array of, or a reference to, a list of numbers. Nonnumeric values in ref are ignored.•Order Optional. A number specifying how to rank number.
=ROUND(A1, 2)
21
The ROUND function rounds a number to a specified number of digits.
Formula Description Result
=ROUND(2.15, 1)Rounds 2.15 to one decimal place
2.2
=ROUND(2.149, 1)Rounds 2.149 to one decimal place
2.1
=ROUND(-1.475, 2)Rounds -1.475 to two decimal places
-1.48
• A nested function occurs when 1 function is
embedded as an argument to another function;
for example:
=IF(A1<A2,MIN(B1:B5),MAX(B1:B5))
– Compute the MIN function if A1 is less than A2
– Compute the MAX function if A1 is not less than A2
29Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
• Since dates are numeric, calculations can be
performed, such as subtraction
• The TODAY function displays the CURRENT date
• The NOW function displays the current date and
TIME
30Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
• Calculates the fraction of the year represented by the number
of whole days between 2 dates (the start_date and the
end_date).
31
DATA DESCRIPTION
1/1/2012 Start date
7/30/2012End date
FORMULA DESCRIPTION RESULT
=YEARFRAC(A2,A3)
Fraction of the year between 1/1/2012 and 7/30/12, omitting the Basis argument.
0.58055556
• =IF(logical_test, value_if_true,value_if_false)
• The =IF function has 3 arguments:
– A condition that is tested to determine if it is either true
or false
– The resulting value IF the condition is true
– The resulting value IF the condition is false
32Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
• The logical test is built from the logical operators
33Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
34Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
• Lookup functions are used to look up values in
a table to perform calculations or display results
– For example, a teacher may want to look up an average
in order to assign a grade
35Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
• When searching a range, the BREAKPOINT is the
lowest value for a category or series
• A lookup table typically lists breakpoints in 1
column and return values in a 2nd column
36Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
-0-59.9 = “F”
-60-69.9=“D”
-70-79.9=“C”
-and so on…..
• The VLOOKUP function searches a lookup table
for a value and returns the result from the relatedcolumn
• VLOOKUP has 3 required arguments:
–Lookup value
– Table array (range of lookup table)
–Column index of return value
• ADD a 4th argument: FALSE if you
want an EXACT MATCH
37Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
38Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
• The HLOOKUP function is used when the
breakpoints and return data are placed in ROWS
• The 3rd argument now lists the ROW index
39Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
• A range NAME is a word or string of characters assigned to 1 or more cells
• Range names make formulas easier to read
40Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
• Range names use the following rules:
– 1 to 255 characters
– Begin with a letter OR underscore (_)
– Contain letters, digits, periods, underscores
• Valid names include Rate, OR: Tax_Rate, OR:
Rate_2012
41Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
• Excel offers a variety of methods to enter a
range name after selecting the cells:
– Type the range name in the Name Box area
– Enter the name using New Name dialog box
42Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
• Use the: FORMULAS > NAME MANAGER
dialog box to edit or delete a range name
43Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.