Microsoft Excel Setting up Constants; the Payment, Present Value, and Conditional functions; What-If analysis
Objectives Relative, Absolute, and Mixed Cell References Setting up, and using constants Using the Payment function Using the Present Value function Using the Conditional function Using the Data Table to answer what-if questions Format Painter Freezing/unfreezing panes Rotating text in a cell
Relative Cell References The position of a cell containing a formula determines the relative cell reference in a formula (i.e. A1) Whenever you change the position of the container cell, the relative cell reference changes Suppose cell G2 contains the following formula =A1*B2 When moved or copied to cell H3, the formula is automatically adjusted to =B2*C3
Absolute Cell References Absolute cell references (i.e. $A$1) do not depend on the position of the cell containing the formula Whenever you change the position of the container cell, the absolute cell references remain constant If G2 contains =$A$1*B2, when moved or copied to H3, the formula becomes =$A$1*C3
Mixed Cell References Mixed cell reference occurs when only the column or a row reference is absolute, while the other (row or column) reference is relative (i.e. $A1 or A$1) Whenever the position of the container cell is changed, only the relative column or row reference changes If G2 contains =$A1*B$2, when moved to H3 becomes =$A2*C$2
Setting up and Using Constants Decide what constants you will be using, and put these constants in a section Every time you access constants in another cell or formula, make sure the constant’s cell address contain $ signs
Using the Payment function The payment function is used to calculate the amount you pay every period (month, year, etc), given an interest rate, number of payments, and the loan principal =PMT uses the following parameters: –Rate: Depends on the payment period. If you choose a monthly payment period, this parameter must be a monthly interest rate (yearly interest rate / 12) –Number of payments: Depends on the payment period. If you choose a monthly payment period for, this parameter must be the total number of months (years on loan * 12) –Loan Principal: Present Value or the amount of the loan
=PMT Function The payment function will return a negative value. You can turn the value into a positive amount by adding a minus sign in front of the function name: =-PMT(…) Notice the use of absolute cell addresses for constants The Rate and Number of payments parameters were converted to monthly Interest Rate and payments, given the number of years
Using the Present Value function The present value function is used to find out how much is owed on a loan (Ending Balance), which is also the amount a loan or investment is worth to a lender =PV() uses the following parameters: –Rate: Depends on the payment period. If you choose a monthly payment period, this parameter must be a monthly interest rate (yearly interest rate / 12) –Number of future payments: Depends on the payment period and number of years paid. If you choose a monthly payment period for, this parameter must be the total number of months 12*(years on loan – years paid) –Amount paid each period: Fixed payment (from =PMT function)
=PV Function The present value function will return a negative value. You can turn the value into a positive amount by adding a minus sign in front of the function name: =-PV(…) Notice the number of future payments parameter is derived from the Year column, which increases by one every row. Thus, the number of future payments would decrease by one every row The Payment amount is treated as a constant
Using the Conditional function The conditional function returns one value if the condition is true, and another if the condition is false =IF uses the following parameters: –Condition: Is any value that can be tested. For example, the condition A1<99 would be TRUE if A1 contained 98.7, and FALSE whenever A1 is greater than or equal to 99 –True part: Specifies the return value when the condition is true –False part: Specifies the return value when the condition is false
Conditional function output =IF(A1<99,“No Fever”,“Fever”) prints “No Fever” when A2 contains a number less than 99, and “Fever” when that number is greater than or equal to 99 Can be used to return actual numbers or cell contents: –=IF(A1<99,0,1) returns a 0 or a 1 –=IF(A1<99,“No Fever”,A1) returns “No Fever”, or the actual fever temperature
=IF function output Given cell A1 of 98.7, the =IF functions in cells B3, B4, and B5 produced the following output Given cell A1 of 102, the =IF functions in cells B3, B4, and B5 produced the following output
Using the Data Table The Data Table is a shortcut for calculating multiple versions of the spreadsheet, and produces a comparison table given changes in a particular variable Suppose we wished to see the effect different interest rates have on the payment amount Set up a two column table so that –The first column contains different interest rates –The second column will contain different payment amounts, and includes the payment amount we calculated with the =PMT function (i.e. from C5)
Setting up the Data Table Highlight the two column table (i.e. F2:G5) Go to the Data menu, select Table In the Column input cell field, enter the address of the cell that contains the interest rate used to calculate the payment (i.e. use C3)
Using Format Painter The format painter is useful for copying a particular format from a source cell, and “painting” it into one or more destination cell(s) When you are in the source cell, click the Format Painter button in the Formatting toolbar The mouse should change to a paintbrush Paint by clicking on one or more destination cell(s)
Freezing/Unfreezing Panes Useful for keeping the row and column headings visible as you scroll through a large table Select the upper left edge of the table you wish to scroll (i.e. B7) Go to the Window menu, select Freeze Panes To unfreeze panes, Go to the Window menu and select Unfreeze Panes
Rotating text in cells You can rotate the text in cells to clearly label the headers in a table Select the cells you wish to rotate text (i.e. A6:E6) Go to the Format menu, select Cells In the Alignment tab, look for the Orientation section, enter 45 in the Degrees box Click OK Change the height of the row (i.e. 79.5)
Rotated text in table headers