chapter 2 formulas and functions

36
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

Upload: others

Post on 28-Dec-2021

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chapter 2 Formulas and Functions

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

Page 2: 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

Page 3: Chapter 2 Formulas and Functions

• 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.

Page 4: Chapter 2 Formulas and Functions

• 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.

Page 5: Chapter 2 Formulas and Functions

• 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.

Page 6: Chapter 2 Formulas and Functions

• A circular referenceerror occurs if a formula

refers to itself

6Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.

Page 7: Chapter 2 Formulas and Functions

• An Excel function is a predefined formula that

performs a calculation

7Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.

Page 8: Chapter 2 Formulas and Functions

• 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.

Page 9: Chapter 2 Formulas and Functions

• When a function is typed, Formula AutoComplete

displays a list of functions matching the partialentry

9Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.

Page 10: Chapter 2 Formulas and Functions

• A function ScreenTip is a small pop-up description

that displays the function arguments.

10Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.

Page 11: Chapter 2 Formulas and Functions

• 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.

Page 12: Chapter 2 Formulas and Functions

• The Function Arguments dialog box offers HELP

on each argument

12Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.

Page 13: Chapter 2 Formulas and Functions

• 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.

Page 14: Chapter 2 Formulas and Functions

• 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.

Page 15: Chapter 2 Formulas and Functions

15Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.

Page 16: Chapter 2 Formulas and Functions

16Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.

Page 17: Chapter 2 Formulas and Functions

=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).

Page 18: Chapter 2 Formulas and Functions

• 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.

Page 19: Chapter 2 Formulas and Functions

• 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

Page 20: Chapter 2 Formulas and Functions

=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.

Page 21: Chapter 2 Formulas and Functions

=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

Page 22: Chapter 2 Formulas and Functions

• 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.

Page 23: Chapter 2 Formulas and Functions

• 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.

Page 24: Chapter 2 Formulas and Functions

• 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

Page 25: Chapter 2 Formulas and Functions

• =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.

Page 26: Chapter 2 Formulas and Functions

• The logical test is built from the logical operators

33Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.

Page 27: Chapter 2 Formulas and Functions

34Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.

Page 28: Chapter 2 Formulas and Functions

• 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.

Page 29: Chapter 2 Formulas and Functions

• 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…..

Page 30: Chapter 2 Formulas and Functions

• 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.

Page 31: Chapter 2 Formulas and Functions

38Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.

Page 32: Chapter 2 Formulas and Functions

• 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.

Page 33: Chapter 2 Formulas and Functions

• 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.

Page 34: Chapter 2 Formulas and Functions

• 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.

Page 35: Chapter 2 Formulas and Functions

• 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.

Page 36: Chapter 2 Formulas and Functions

• Use the: FORMULAS > NAME MANAGER

dialog box to edit or delete a range name

43Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.