excel functions. prof. leighton2 a function performs a predefined operation performs a predefined...

29
Excel Functions Excel Functions ) ( x f y

Post on 21-Dec-2015

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Excel FunctionsExcel Functions

)(xfy

Page 2: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 22

A FunctionA Function

Performs a predefined operationPerforms a predefined operation A function A function

Accepts one or more arguments as inputAccepts one or more arguments as input Performs the indicated calculationPerforms the indicated calculation Returns another value as outputReturns another value as output

Page 3: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 33

Nine CategoriesNine Categories

FinancialFinancial Date&TimeDate&Time Math&TrigMath&Trig StatisticalStatistical Lookup&ReferenceLookup&Reference

DatabaseDatabase TextText LogicalLogical EngineeringEngineering AllAll

Page 4: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 44

Function SyntaxFunction Syntax

Begin with an = signBegin with an = sign Function’s NAMEFunction’s NAME No spaceNo space Open parenthesisOpen parenthesis Argument1, argument2Argument1, argument2 Close parenthesisClose parenthesis

Page 5: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 55

Statistical FunctionsStatistical Functions

=Average(number1,number2,..)=Average(number1,number2,..) Excel sums the values in the range and then Excel sums the values in the range and then

divides by the number of divides by the number of non-blanknon-blank cells in the cells in the range range

=Stdev(number1,number2,..)=Stdev(number1,number2,..) =Max(number1,number2,..)=Max(number1,number2,..) =Median(number1,number2,..)=Median(number1,number2,..) =Pearson(number1,number2,..)=Pearson(number1,number2,..)

Pearson correlation coefficientPearson correlation coefficient

Page 6: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 66

Counting FunctionsCounting Functions

=Count=Count Counts the number of cells that contains Counts the number of cells that contains

numbersnumbers =Counta=Counta

Counts the number of cells that are not emptyCounts the number of cells that are not empty Both numeric and text entries are includedBoth numeric and text entries are included

=Countblank(range)=Countblank(range) Counts the number of empty cellsCounts the number of empty cells

=Countif(range,criteria)=Countif(range,criteria) Counts the number of cells within a range that Counts the number of cells within a range that

meets the conditionmeets the condition

Page 7: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 77

Annuity FunctionsAnnuity Functions

An annuity is a series of constant cash payments An annuity is a series of constant cash payments made over a continuous periodmade over a continuous period A car loan or a mortgage is an annuityA car loan or a mortgage is an annuity Benefits received each period is an annuityBenefits received each period is an annuity

Cash you pay out is represented by a negative Cash you pay out is represented by a negative number; cash you receive is represented by a number; cash you receive is represented by a positive number positive number A $1,000 deposit to the bank would be represented by the A $1,000 deposit to the bank would be represented by the

argument -1000 if you are the depositor argument -1000 if you are the depositor A $1,000 deposit to the bank would be represented by A $1,000 deposit to the bank would be represented by

+1000 if you are the bank +1000 if you are the bank The PV FunctionThe PV Function

Value Value nownow of an entire stream of future benefits or costs of an entire stream of future benefits or costs

Page 8: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 88

Annuity Functions - PVAnnuity Functions - PV

SyntaxSyntax =PV(=PV(rate,nper,pmtrate,nper,pmt,fv,type),fv,type)

Rate    Rate    Interest rate per periodInterest rate per period 10 percent 10 percent annualannual interest rate; interest rate; yearlyyearly benefits to MA benefits to MA

degreedegree Nper    Nper   

Total number of payment periods in an annuity – 43 Total number of payment periods in an annuity – 43 yearsyears Enter 43 into the formula for nperEnter 43 into the formula for nper

Pmt    Pmt    Payment (benefit) made each periodPayment (benefit) made each period Cannot change over the life of the annuity Cannot change over the life of the annuity

Page 9: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 99

Annuity Functions - PVAnnuity Functions - PV

Fv    Fv    Future value, or a cash balance you want to Future value, or a cash balance you want to

attain after the last payment is madeattain after the last payment is made If fv is omitted, it is assumed to be 0 (the future If fv is omitted, it is assumed to be 0 (the future

value of a loan, for example, is 0) value of a loan, for example, is 0)

Type   Type    Is the number 0 or 1 Is the number 0 or 1 Indicates when payments are due/receivedIndicates when payments are due/received

0 or omitted = at the end of the period0 or omitted = at the end of the period 1 = at the beginning of the period1 = at the beginning of the period

Page 10: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 1010

Annuity Functions - PVAnnuity Functions - PV

The following functions apply to annuities: The following functions apply to annuities: PMT PMT CUMIPMTCUMIPMT PPMTPPMT IPMTIPMT CUMPRINCCUMPRINC FVSCHEDULEFVSCHEDULE PV PV FVFV RATERATE

Be consistent about the units for specifying rate and nperBe consistent about the units for specifying rate and nper Monthly payments on a four-year loan at 12 percent annual Monthly payments on a four-year loan at 12 percent annual

interest, use 12%/12 for rate and 4*12 for nper. interest, use 12%/12 for rate and 4*12 for nper. Annual payments on the same loan, use 12% for rate and 4 for Annual payments on the same loan, use 12% for rate and 4 for

npernper

Page 11: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 1111

Page 12: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 1212

The IF FunctionThe IF Function

Decision rule for investing is Decision rule for investing is ifif PVB>PVC, PVB>PVC, thenthen invest, invest, otherwise otherwise (else)(else) do not invest do not invest

IF function specifies the IF function specifies the if-then-elseif-then-else logic required to calculate logic required to calculate information based on one or more information based on one or more conditionsconditions

Page 13: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 1313

The IF Function SyntaxThe IF Function Syntax

IF(IF(logical test, value if true, value if logical test, value if true, value if falsefalse)) Logical testLogical test is any value or expression is any value or expression

that Excel evaluates as true or falsethat Excel evaluates as true or false Value if true Value if true - Excel uses this expression - Excel uses this expression

if the logical test is trueif the logical test is true Value if false Value if false - Excel uses this - Excel uses this

expression if the logical test is falseexpression if the logical test is false

Page 14: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 1414

Should Our Student Invest? Should Our Student Invest?

Logical testLogical test is PVB>PBC is PVB>PBC E53>F53 E53>F53

Value if trueValue if true - Invest - Invest Value if falseValue if false - Do not Invest - Do not Invest IF(E53>F53),Invest,Do not invest)IF(E53>F53),Invest,Do not invest)

Page 15: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 1515

Page 16: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 1616

Buying a CarBuying a Car

BMW M5

Page 17: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 1717

What Will the Monthly What Will the Monthly Payments Be?Payments Be?

Amount of loan, Amount of loan, pvpv Interest rate, Interest rate, raterate Number of payment Number of payment

periods, periods, npernper Term of the loanTerm of the loan

Future value, Future value, fvfv Future value of a Future value of a

loan=0loan=0 TypeType, when payments , when payments

are dueare due

Page 18: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 1818

Payment FunctionPayment Function =PMT(=PMT(raterate,,npernper,,pvpv,fv,type),fv,type) Returns the payment per time periodReturns the payment per time period

Cash you pay out is represented by a Cash you pay out is represented by a negative number by Excelnegative number by Excel

Cash you receive is represented by a positive Cash you receive is represented by a positive numbernumber

Keep the interest per period and the Keep the interest per period and the payment periods in the same unitspayment periods in the same units To calculate monthly payments on a four To calculate monthly payments on a four

year loanyear loan Use 12%/12 for rate and 4*12 for nperUse 12%/12 for rate and 4*12 for nper

Page 19: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 1919

Payment Function, cont.Payment Function, cont.

If you want the payment as a positive If you want the payment as a positive numbernumber Enter the loan amount (pv) as a Enter the loan amount (pv) as a

negative numbernegative number =PMT(.08/12,5*12,-15000)=PMT(.08/12,5*12,-15000)

Place a negative sign before the Place a negative sign before the functionfunction

=-PMT(.08/12,5*12, 15000)=-PMT(.08/12,5*12, 15000)

Page 20: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 2020

Payment Function, Payment Function, ExamplesExamples

Monthly payment on a $10,000 loan, Monthly payment on a $10,000 loan, annual rate of 8%, term is 10 months, annual rate of 8%, term is 10 months, payment at the end of each monthpayment at the end of each month PMT(.08/12, 10, 10000) = -$1,037.03PMT(.08/12, 10, 10000) = -$1,037.03

For the same loan, if payments are due For the same loan, if payments are due at the beginning of the periodat the beginning of the period PMT(.08/12, 10, 10000, 0, 1) = -$1,030.16PMT(.08/12, 10, 10000, 0, 1) = -$1,030.16

Page 21: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 2121

Saving Regularly - PMTSaving Regularly - PMT

Use PMT to determine Use PMT to determine how much to save how much to save each month to meet a each month to meet a specific goalspecific goal

Want to retire with Want to retire with one million dollars in one million dollars in 40 years40 years

Earn 10 % interest on Earn 10 % interest on your savingsyour savings

How much must you How much must you save each month?save each month?

Keukenhof, The Netherlands

Page 22: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 2222

Retiring a MillionaireRetiring a Millionaire

PMT(.10/12, 40*12, 0, 1000000) =PMT(.10/12, 40*12, 0, 1000000) =-$158.13-$158.13

Multiply the returned payment by Multiply the returned payment by nper to calculate how much is paid nper to calculate how much is paid over the duration of the annuityover the duration of the annuity $158.13*480 = $75,900$158.13*480 = $75,900

Note, the Note, the pvpv = 0 = 0 fvfv = 1000000 = 1000000

Page 23: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 2323

Page 24: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 2424

Lookup Table for Grades: Lookup Table for Grades: Associate a Numeric Grade with a Associate a Numeric Grade with a

Letter GradeLetter Grade

GPA0 F 0.0

50 D 1.060 C- 1.770 C 2.076 C+ 2.380 B- 2.783 B 3.086 B+ 3.390 A- 3.793 A 4.0

Letter Grades

C starts at 70 and goes to 75.99

Page 25: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 2525

VLOOKUP FunctionVLOOKUP Function

Look-up valueLook-up value is a value or a cell is a value or a cell reference of the item for which you reference of the item for which you need informationneed information It is the search itemIt is the search item Appears in the first column of the Appears in the first column of the

information table information table Table-arrayTable-array is the range reference of is the range reference of

the lookup tablethe lookup table

Page 26: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 2626

VLOOKUP FunctionVLOOKUP Function

Column index numberColumn index number is the column is the column number in the information table from number in the information table from which the information should be which the information should be found and returned to your cellfound and returned to your cell

Range-lookupRange-lookup is set equal to true is set equal to true (the default) and finds the closest (the default) and finds the closest match; to find an exact match, set = match; to find an exact match, set = falsefalse

Page 27: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 2727

Lookup Table for GradesLookup Table for Grades

Look-up value is the 83

A B C1 GPA2 0 F 0.03 60 D 1.04 70 C- 1.75 73 C 2.06 77 C+ 2.37 80 B- 2.78 83 B 3.09 87 B+ 3.3

10 90 A- 3.711 93 A 4.0

Letter Grades

Table Array is A2:C11

Column index number

1 2 3

Student receives an 83 for the semester

Page 28: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 2828

Rules for Rules for VLOOKUP FunctionVLOOKUP Function

The values in the The values in the look_up tablelook_up table must be in must be in ascending order. ascending order.

If Range-lookupIf Range-lookup is set equal to true (the is set equal to true (the default) the function returns the value default) the function returns the value from the table or the largest value less from the table or the largest value less than or equal to the search itemthan or equal to the search item Student receives an 85 (search item)Student receives an 85 (search item) 83 is the largest value less <= 8583 is the largest value less <= 85 Returns a BReturns a B

Page 29: Excel Functions. Prof. Leighton2 A Function Performs a predefined operation Performs a predefined operation A function A function Accepts one or more

Prof. LeightonProf. Leighton 2929

Rules for Rules for VLOOKUP FunctionVLOOKUP Function

If If Range-lookupRange-lookup is set equal to false, is set equal to false, the search item must be found or the search item must be found or #N/A is returned#N/A is returned

The range of the information table The range of the information table should be absolute referenceshould be absolute reference