Sie sind auf Seite 1von 26

UCL

EDUCATION & INFORMATION SUPPORT DIVISION


INFORMATION SYSTEMS

Excel 2003

Advanced Excel
Formulae &
Functions

Document No. IS-027 v2


Contents

Introduction........................................................................................................ii
CONVERT................................................................................................ 1
Database functions.................................................................................2
Creating the criteria range 2
Entering a database function on the worksheet 3
Logical functions.................................................................................... 5
IF statements 5
Nested IF 6
Statistical IF statements 6
AND, OR, NOT 7
Financial functions................................................................................. 9
Future Value function (FV) 9
Present Value function (PV) 10
Net Present Value (NPV) 11
RATE 12
Payment function (PMT) 13
Data tables............................................................................................ 14
One-input data table 14
Two-input data table 15
Learning more...................................................................................................16

Advanced Excel formulae and functions


Introduction
This workbook, together with the More Excel formulae and functions
workbook, has been prepared to help you learn more about Excel formulae and
functions. They are aimed at those who have a good understanding of the basic
use of Excel for entering data and assume knowledge of moving around a
worksheet, formatting cells, controlling worksheet display and printing. These
topics are all covered in the Getting started with Excel course.
It is also assumed that you have attended the Introduction to Excel formulae
and functions course or have a good working knowledge of all the topics
covered on that course. In particular, you should be able to do the following:
Edit and copy formulae
Use AutoFill
Use basic built-in functions such as Sum, Count, Average and AutoSum
Use absolute and relative cell referencing
Name cells and ranges
Use logical IF functions
Understand error messages
Ideally you should have attended the More Excel formulae and functions course
and know how to use IF statements and nested IFs.
This guide can be used as a reference or tutorial document. To assist your
learning, a series of practical tasks are available in a separate document. You
can download the training files used in this workbook from the IS training
website at: www.ucl.ac.uk/is/training/exercises.htm

Introduction UCL Information Systems


CONVERT
The CONVERT function converts a number from one measurement system to
another. For example, CONVERT can translate a table of distances in miles to a
table of distances in kilometres.
This function is not loaded by default with the standard installation of Excel. If
it is not available you can install it by selecting Tools|Add-Ins, checking the
Analysis ToolPak box, and clicking OK.
To use the CONVERT function:
1. Open the Insert Function dialog box by clicking the Insert Function button
on the Formula bar or selecting Insert|Function.
2. From the All function category, select CONVERT.
The CONVERT function consists
of: CONVERT(number,
from_unit, to_unit)
Number is the value in
from_units to convert.
From_unit is the units of
the input number (or
cell reference).
To_unit is the units for the
result.
CONVERT accepts the following text values for from_unit and to_unit (both are
case-sensitive):
From_unit or to_unit From_unit or to_unit
Distance Weight and mass
Meter "m" Gram "g"
Statute mile "mi" Kilogram "kg"
Nautical mile "Nmi" Pound mass "lbm"
Inch "in" Ounce mass "ozm"
Foot "ft"
Yard "yd" Liquid measure
Teaspoon "tsp"
Time Tablespoon "tbs"
Year "yr" Fluid ounce "oz"
Day "day" Cup "cup"
Hour "hr" Pint "pt"
Minute "mn" Quart "qt"
Second "sec" Gallon "gal"
Litre "l"
Temperature
Degree Celsius "C"
Degree Fahrenheit "F"

See Microsoft Excel Help|Convert worksheet function for a complete list of


accepted values.
Examples:
CONVERT(1.0, "lbm", "kg") equals 0.453592 (i.e., 1 pound mass =
0.454592 kilograms)
CONVERT(68, "F", "C") equals 20 (i.e., 68 degrees Fahrenheit = 20 degrees
Celsius)
CONVERT(6, "ft", "m") equals 1.8288 (i.e., 6 feet = 1.822
metres)
If the input data types are incorrect, CONVERT returns the #VALUE! error
value. If the unit does not exist or the units are in different categories,
CONVERT returns the #N/A error value.
Database functions
There are several Excel functions which are specifically designed to enable you
to analyse data, a selection of which appear in the table below.

Function Purpose
DCOUNT(Database,Field,Criteria) To count the number of records in a list which meet specified
criteria. This function will only count value cells.
DCOUNTA(Database,Field,Criteria) To count the number of records in a list which meet specified
criteria. This function counts text and value cells.
DSUM(Database,Field,Criteria) To add the contents of the chosen field in a list, subject to any
specified criteria.
DMIN(Database,Field,Criteria) To find the minimum value in the chosen field in a list, subject to
any specified criteria.
DMAX(Database,Field,Criteria) To find the maximum value in the chosen field in a list, subject to
any specified criteria.
DAVERAGE(Database,Field,Criteria) To find the average value of the chosen field in a list, subject to
any specified criteria.
DGET(Database,Field,Criteria) To return the contents of the chosen field subject to any
specified criteria. This function is only valid where a single
record meets the criteria set.
DPRODUCT(Database,Field,Criteria) To multiply the contents of the chosen field in a list, subject to
any specified criteria.
Field indicates which column is used in the function. Columns of data in the
list must have an identifying label in the first row. Field can be given as
text with the column label enclosed between double quotation marks,
such as "Department" or "Age" in the example list below, or as a
number that represents the position of the column in the list: 1 for the
first column (First in the example below), 2 for the second (D.O.B),
etc. You can also use the cell reference that contains the column label
(F6 in the example below).
Criteria is a reference to a range of cells that specify conditions for the
function. The function returns information from the list that matches
the conditions specified in the criteria range. The criteria range
includes a copy of the column label in the list for the column you want
the function to summarise. The criteria reference can be entered as a
cell range, such as B1:F2 in the example database below, or as a name
that represents the range, such as "Criteria".
In all cases, if the criteria range is blank, these functions will apply to the
entire list area. Once data is entered in the criteria range, the results of the
database functions will adjust to reflect only those records meeting the criteria.

Creating the criteria range


The criteria range has to be at least one column and two rows in size. The first
row must contain the column labels (field names) in any order. It is easier to
copy the original labels so that no mistakes are made. It is not necessary to
include all the column labels in the criteria range. It could be restricted to only
those labels on which you wished to perform your functions, and those labels
could be displayed in a different order. Usually, however, the names are copied
complete from the top of the list.
The second/third blank rows will contain the required match information.

To define the criteria range:


1. Copy the required column headings as explained above.
2. Enter criteria in the blank row of the criteria range under the appropriate
column label(s).
Putting multiple criteria on the same row dictates that the first criteria
AND all other criteria must be met.
Putting criteria on the next row dictates that the criteria in the first row
OR the criteria in the second row must be met.
There may be situations where you wish to set more than one criteria for a
particular field. For example, you may wish to specify that the age field should
be more than a particular age (>20) AND less than a particular age (<60), i.e.
between 20 and 60.
To do this you would need to repeat the column label. See the example below:
Surname First D.O.B. Department Absence Age Age
>20 <60

Helpful hints:
Although the criteria range can be located anywhere on the worksheet, do not place the criteria range below
the list. If you add more information to the list by using the Form command on the Data menu, the new
information is added to the first row below the list. If the row below the list is not blank, Excel cannot add the
new information.
Make sure the criteria range does not overlap the list.
Note that if you change criteria, existing answers will change. To keep existing answers, create a new criteria
range for subsequent queries.
To perform an operation on an entire column in a database, enter a blank line below the column labels in the
criteria range.

Entering a database function on the worksheet


The arguments for all of these functions are identical, and the easiest way
to incorporate them into a worksheet is by using the Insert Function dialog
box.
1. With the cell selected that will contain your result, click the Insert
Function button on the Formula bar or select Insert|Function to open the
Insert Function dialog box.
2. In the Select a category list, select Database.
3. From the Select a function list choose
the database function you require:
e.g. =DAVERAGE()
4. Enter the three arguments: list range (in the example below, cells A6:F25);
field name (F6, Age); and criteria range (A1:F2).
5. Press Enter.
Helpful hint:
If you have assigned the range name Database to your list area and Criteria to your criteria range you use F3
to paste the names in.

The field may be entered as a number or as text. If the field on which the
function is to operate is the fifth column within the database, you could enter
the number 5 as the field argument. Alternatively, the field name could be
entered as text, in which case it would need to be enclosed in double quotes:
=DMAX(database,"age",criteria)

In the example below, the formula shown on the Formula bar has been entered
into the cell to the right of the label Average. This formula averages the Age
column. All the database functions look at what has been entered in the criteria
range in order to give their results.

Criteria
range

List Field
range name
Logical functions
Excel has a number of logical functions, which allow you to set various
conditions and have data respond to them. For example, you may only want a
certain calculation performed, or piece of text displayed, if certain conditions
are met. The functions used to produce this type of analysis are found in the
Insert Function dialog box in the Logical function category.

IF statements
The IF function is used to analyse data, test whether or not it meets certain
conditions and then act upon its decision. The formula can be entered either by
typing it or by pasting it from the Formula, Paste Function box. Typically, the IF
statement is accompanied by three arguments enclosed in one set of
parentheses; the condition to be met (logical_test); the action to be performed
if that condition is true (value_if_true); the action to be performed if false
(value_if_false). Each of these is separated by a comma, as shown:
=IF( logical_test , value_if_true , value_if_false)

Logical test
This part of the IF statement is the condition, or test. You may want to test to
see if a cell is a certain value, or to compare two cells. In these cases, symbols
called logical operators are useful:

= Equal to <> Not equal to

> Greater than < Less than

>= Greater than or equal to <= Less than or equal to

Therefore, a typical logical test might be B1 > B2, testing whether or not the
value contained in cell B1 of the spreadsheet is greater than the value in cell
B2. Names can also be included in the logical test, so if cells B1 and B2 were
respectively named SALES and TARGET, the logical test would read SALES >
TARGET.
Another type of logical test could include text strings. If you want to check a
cell to see if it contains text, that text string must be included in quotation
marks. For example, cell C5 could be tested for the word YES as follows;
C5="YES".
It should be noted that Excel's logic is, at times, brutally precise. In the above
example, the logical test is that sales should be greater than target. If sales are
equal to target, the IF statement will return the false value. To make the logical
test more flexible, it would be advisable to use the operator > = to indicate
meeting or exceeding (greater than or equal to).
Value if true / false
Provided that you remember that the TRUE value always precedes the FALSE
value, these two values can be almost anything. If desired, a simple number
could be returned, a calculation performed, or even a piece of text entered.
Also, the type of data entered can vary depending on whether it is a true or
false result. You may want a calculation if the logical test is true, but a message
displayed if false. (Remember that text to be included in functions should be
enclosed in quotes.)

Nested IF
When you need to have more than one condition and more than two possible
outcomes, a nested IF is required. This is based on the same principle as a
normal IF statement, but involves nesting a secondary formula inside the main
one. The secondary IF forms the FALSE part of the main statement, as follows:
=IF(1st logic test, 1st true value, IF(2nd logic test, 2nd true value, false
value))
Only if both logic tests are found to be false will the false value be returned.
Notice that there are two sets of parentheses, as there are two separate IF
statements. This process can be enlarged to include more conditions and more
eventualities up to 7 IFs can be nested within the main statement. However,
care must be taken to ensure that the correct number of parentheses are
added.

Statistical IF statements
A very useful technique is to display text or perform calculations only if a cell is
the maximum or minimum of a range. In this case the logical test will contain a
nested statistical function (such as MAX or MIN). If, for example, a person's
sales cell is the maximum in the sales column, a message stating "Top
Performer" could appear next to his or her name. If the logical test is false, a
blank message could appear by simply including an empty set of quotation
marks. When typing the logical test, it should be understood that there are two
types of cell referencing going on. The first is a reference to one person's
figure, and is therefore relative. The second reference represents the range of
everyone's figures, and should therefore be absolute.
=IF(relative cell = MAX(absolute range), "Prize Winner", "")
In this example the IF statement for cell B2 will read:
=IF(C2=MAX($C$2:$C$6),"Prize Winner","Better luck next time")
When this is filled down through cells B3 and B4, the first reference to the
individual's sales figure changes, but the reference to all three sales figures
($C$2:$C$4) should remain constant. By doing this, you ensure that the IF
statement is always checking to see if the individual's figure is the biggest out
of the three.
A further possibility is to nest another IF statement to display a message if a
value is the minimum of a range. Beware of syntax here the formula could
become quite unwieldy!
AND, OR, NOT
Rather than create large and unwieldy formulae involving multiple IF
statements, the AND, OR and NOT functions can be used to group logical tests
or conditions together. These three functions can be used on their own, but in
that case they will only return the values TRUE or FALSE. As these two values
are not particularly meaningful on a spreadsheet, it is much more useful to
combine the AND, OR and NOT functions within an IF statement. This way, you
can ask for calculations to be performed or other text messages to appear as a
result.

AND
This function is a logical test to see if all conditions are true. If this is the case,
the value TRUE is returned. If any of the arguments in the AND statement are
found to be false, the whole statement produces the value FALSE. This function
is particularly useful as a check to make sure that all conditions you set are
met.
Arguments are entered in the AND statement in parentheses, separated by
commas, and there is a maximum of 30 arguments to one AND statement. The
following example checks that two cells, B1 and B2, are both greater than 100:
=AND(B1>100,B2>100)
If either one of these two cells contains a value less than a hundred, the result
of the AND statement is "FALSE". This can now be wrapped inside an IF
function to produce a more meaningful result. You may want to add the two
figures together if they are over 100, or display a message indicating that they
are not high enough.

=IF(AND(B1>100,B2>100),B1+B2,"Figures not high enough")

Another application of AND is to check that a number is between certain limits.


The following example checks that a number is between 50 and 100. If it is, the
value is entered. If not, a message is displayed:
=IF(AND(B1>50,B1<100),B1,"Number is out of range")
OR
This function is a logical test to see if one or more conditions are true. If this is
the case, the value TRUE is returned. If just one of the arguments in the OR
statement is found to be true, the whole statement produces the value TRUE.
Only when all arguments are false will the value FALSE be returned. This
function is particularly useful as a check to make sure that at least one of the
conditions you have set is met.
=IF(OR(B1>100,B2>100),B1+B2,"Figures not high enough")
In the above formula, only one of the numbers in cells B1 and B2 has to be over
100 in order for them to be added together. The message only appears if
neither figure is high enough.

NOT
NOT checks to see if the argument is false. If so, the value TRUE is returned. It
is best to use NOT as a provided this is not the case function. In other words, so
long as the argument is false, the overall statement is true. In the example
below, the cell contents of B1 is returned unless the number 13 is encountered.
If B1 is found to contain 13, the message "Unlucky!" is displayed:
=IF(NOT(B2=13),B2,"Unlucky!")
The NOT function can only contain one argument. If it is necessary to check
that more than one argument is false, the OR function should be used and the
true and false values of the IF statement reversed. Suppose, for example, a
check is done against the numbers 13 and 666:
=IF(OR(B2=13,B2=666),"Unlucky!",B2)
Financial functions
Excel offers many different financial functions. For a complete list use Excel
help (F1), browse the Table of Contents, select Working with Data, and
within the Function Reference section locate the Financial Functions sub-
menu. This course covers the following financial functions in more detail:
FV (Future Value), PV (Present Value), NPV (Net Present Value), RATE and PMT
(Payment)

Future Value function (FV)


The FV function is used to find the future value of an investment, given the
amount of each payment, the constant interest rate, and the total number of
payments. It is the opposite of the Present Value (PV) function, calculating the
value at some future date of an investment that makes payment as a lump sum
or as a series of equal periodic payments. This function takes the arguments
(rate, number of periods, payment, present value, type) as detailed below:
= FV(rate,nper,pmt,pv,type)
rate is the interest rate per period (e.g. 5%/12 for monthly payments at 5%
APR).
nper is the total number of payment periods in an annuity.
pmt is the payment made each period; it cannot change over the life of the
annuity. Typically, pmt contains principal and interest but no other fees or
taxes. If pmt is omitted, you must include the pv argument.
pv is the present value, or the lump-sum amount that a series of future
payments is worth right now. If pv is omitted, it is assumed to be 0 (zero),
and you must include the pmt argument.
type indicates when payments are due. 0 means payment is due at the end of
the period, 1 means payment is due at the beginning of the period. If
type is omitted, it is assumed to be 0.
Helpful hints:
Make sure that you are consistent about the units you use for specifying rate and nper. If you make monthly
payments on a four-year loan at 12 percent annual interest, use 12%/12 for rate and 4*12 for nper. If you make
annual payments on the same loan, use 12% for rate and 4 for nper.
For all the arguments, cash you pay out, such as deposits to savings, is represented by negative numbers;
cash you receive, such as dividend cheques, is represented by positive numbers.
Example 1:
To establish the future value of an
investment of 100 per month over 10
years at an annual interest rate of 5%:

Example 2:
You are thinking about starting a pension fund. You plan to deposit 2000 in the
fund at the beginning of each year and you expect the average rate of return to
be 9% per year for the entire term. Assuming you are now 30 years old, how
much money will your account accumulate by the time you are 65? Use the
formula =FV(9%,35,-2000, ,1). This informs you that your pension fund will be
worth 470,249.45 at the end of 35 years.
Now assume that you started the pension fund 3 years earlier and have already
accumulated 7500 in your account. Use the formula =FV(9%,35,-2000,-
7500,1) to find that your fund will grow to 623,354.20 at the end of the 35
years.
In both cases the type argument is 1 because the payments occur at the
beginning of the period.
Helpful hint:
Including this argument is particularly important in financial calculations that span many years. If you omit the
type argument in the formula, Excel assumes that you add money to your account at the end of each year and
would have returned the value 584,526.27 a difference of 38,828.
Present Value function (PV)
This function calculates the present value of an investment. The PV is the total
amount that a series of future payments is worth now. For example, when you
borrow money, the loan amount is the present value to the lender.
Present value is one of the most common methods for measuring the
attractiveness of a long-term investment. It is determined by discounting the
payments received from the investment back to the present time. If the present
value of the payments is greater than the cost of the investment, the
investment is a good one.
You can calculate the PV of a series of equal periodic payments or a lump sum.
This function takes the arguments (rate, number of periods, payment, future
value, type) as detailed below:
= PV(rate,nper,pmt,fv,type)
rate is the interest rate per period. For example, if you obtain an car loan at a
10 percent annual interest rate and make monthly payments, your
interest rate per month is 10%/12, or 0.83%. You would enter 10%/12, or
0.83%, or 0.0083, into the formula as the rate.
nper is the total number of payment periods in an annuity. E.g. if you get a
four-year car loan and make monthly payments, your loan has 4*12 (or
48) periods. You would enter 4*12 or 48 into the formula for nper.
pmt is the payment made each period and cannot change over the life of the
annuity. Typically, pmt includes principal and interest but no other fees or
taxes. For example, the monthly payments on a 10,000, four-year car
loan at 12 percent are 263.33. You would enter -263.33 into the formula
as the pmt. If pmt is omitted, you must include the fv argument.
fv is the future value, or a cash balance you want to attain after the last
payment is made. If fv is omitted, it is assumed to be 0 (the future value
of a loan, for example, is 0). For example, if you want to save 25,000 to
pay for a special project in 10 years, then 25,000 is the future value. You
could then make a conservative guess at an interest rate and determine
how much you must save each month. If fv is omitted, you must include
the pmt argument.
type is the number 0 or 1 and indicates when payments are due.
To calculate the PV of a series of payments, enter a value for the payment
argument. To calculate the PV of a lump sum payment, enter a value for the
future value argument. For an investment
with both a series payment and a lump-sum
payments, use both arguments.
Example 1:
To establish the Present Value of an investment
of 100 per month over 10 years at an annual
interest rate of 5%:
Example 2:
You are presented with an investment opportunity that returns 1000 each year
over the next five years. To receive this annuity, you must invest 4000. Are you
willing to pay 4000 today to earn 5000 over the next five years? To decide
whether this investment is acceptable, you need to determine the present value
of the 1000 per year payments you will receive.
As an alternative, you could invest your 4000 in an account that pays 4.5%
interest. Therefore, we will use the rate of 4.5% as the discount rate of your
investment. To determine the present value of this investment, we will use the
formula =PV(4.5%,5,1000), which returns the value -4389.98, meaning that
you should be willing to spend 4389.98 now to receive 5000 over the next 5
years. Because your investment is only 4000, you can see that this is an
acceptable investment.
If you were offered a lump sum of 5000 at the end on the 5 year period
instead of each year, would the investment still be attractive? To find out, use
the formula: =PV(4.5%, 5, , 5000) A comma is used as a placeholder for the
unused payment argument.
This formula returns the present value of -4012.26 which means that, at a
discount rate of 4.5%, you should be willing to spend 4012.26 to receive
5000 in five years time. Although this is not as attractive, it is still acceptable
because your investment is only 4000.
Net Present Value (NPV)
NPV calculates the Net Present Value of an investment by using a discount rate
and a series of future payments (negative values) and income (positive values).
The NPV function calculates the net present value, which is another common
method for determining the profitability of an investment. Any investment that
gives an NPV value greater than zero is considered profitable. This function
takes the arguments (rate, value1, value2 ) as detailed below:
= NPV(rate,value1,value2, ...)
rate is the rate of discount over the length of one period.
value1, value2, ... are 1 to 29 arguments representing the payments and
income.
value1, value2, ... must be equally spaced in time and occur at the end
of each period.
NPV uses the order of value1, value2, ... to interpret the order of cash
flows. Be sure to enter your payment and income values in the correct
sequence.
Arguments that are numbers, empty cells, logical values, or text
representations of numbers are counted; arguments that are error
values or text that cannot be translated into numbers are ignored.
If an argument is an array or reference, only numbers in that array or
reference are counted. Empty cells, logical values, text, or error values
in the array or reference are ignored.
Helpful hints:
NPV is similar to the PV function (present value). There are two main differences between PV and NPV.
1. PV allows cash flows to begin either at the end or at the beginning of the period but must be made
constantly throughout the investment, whereas NPV assumes that all payments and receipts are evenly
distributed and that they occur at the end of the period.
2. NPV allow variable cash flow values, whereas PV assumes constant inflow values.
NPV is also related to the IRR function (Internal Rate of Return). IRR is the rate for which NPV equals zero:
NPV(IRR(...), ...) = 0.
If the cost of the investment must be paid at the beginning of the period, you should not include the cost as
one of the functions value arguments, but should subtract it from the result of the function.
If, however, the cost must be paid at the end of the first period, you should include it as a negative first
value argument.

Example of NPV:
You are thinking about an investment on which you expect to incur a loss of
55.000 at the end of the first year, followed by gains of 95,000, 140,000,
and 185,000 at the end of the second, third, and fourth years. You will invest
250,000 up front, and the discount rate is 12%. To calculate this investment,
use the formulae:
=NPV(12%,-55000, 95000, 140000, 185000) -250000
The result of -6153.65 tells you that you will not make a profit from this
investment. (Note that the negative numbers in this formula show the money
you have spent on your investment.)
Helpful hint:
You can use the Excel Goal Seek command to determine what initial cost or interest rate would justify the
investment. This is covered on the Advanced Excel Data Analysis Tools course.)
If you paid the initial investment at the end of the first year, instead of at the
beginning, you would use the following formula:
=NPV(12%, (-250000-55000), 95000, 140000, 185000)
The result of 20,632.07 would suggest that this might be a profitable
investment.

RATE
The RATE function determines the rate of return of an investment that
generates a series of equal periodic payments or a single lump sum payment.
This function takes the argument (number of periods, payment, present value,
future value, type, guess) as detailed below:

= RATE(nper,pmt,pv,fv,type,guess)
nper is the total number of payment periods in an annuity.
pmt is the payment made each period and cannot change over the life of the
annuity. Typically, pmt includes principal and interest but no other fees or
taxes. If pmt is omitted, you must include the fv argument.
pv is the present value the total amount that a series of future payments is
worth now.
fv is the future value, or a cash balance you want to attain after the last
payment is made. If fv is omitted, it is assumed to be 0 (the future value
of a loan, for example, is 0).
type is the number 0 or 1 and indicates when payments are due.
guessis your guess for what the rate will be.
If you omit guess, it is assumed to be 10 percent.
If RATE does not converge, try different values for guess. RATE usually
converges if guess is between 0 and 1.
You use either the payment (pmt) argument to calculate the rate for a series
of equal periodic payments or the future value (fv) argument to calculate the
rate of a lump sum payment.
The RATE function uses an iterative process to calculate the rate of return. The
function begins by computing the net present value (npv) of the investment at
the guess rate. If that first npv is greater than zero, the function selects a
higher rate and repeats the npv calculation; if the first npv is less than zero, the
function selects a lower rate for the second iteration. RATE continues this
process until it arrives at the correct rate of return or until it has gone through
20 iterations.
Helpful hints:
Make sure that you are consistent about the units you use for specifying guess and nper. If you make monthly
payments on a four-year loan at 12 percent annual interest, use 12%/12 for guess and 4*12 for nper. If you
make annual payments on the same loan, use 12% for guess and 4 for nper.
RATE is calculated by iteration and can have zero or more solutions. If the successive results of RATE do not
converge to within 0.0000001 after 20 iterations, RATE returns the #NUM! error value. If this happens, try
entering a different guess rate and give the function another chance. A rate between 10% and 100% usually
works.
Example:
You are considering an investment that will pay you five annual 1000
payments. The investment costs 3000. To determine the actual annual rate of
return on your investment, use the formula:
=RATE(5, 1000, -3000)
This formula returns 20%, an excellent rate of return on this investment.
Payment function (PMT)
The payment function takes a loan amount, length of loan, and interest rate to
calculate the monthly repayments.
The format is =PMT(rate,nper,pv)
Rate is the interest rate per period.
nper is the total number of payments in the
period.
Pv is the present value (total size) of the
loan.
fv is the future value, or a cash balance
you want to attain after the last
payment is made.
type is the number 0 or 1 and indicates when payments are due.

Example 1:
A 10 year loan (120 months) of 40,000 at a rate of 6% would need monthly
repayments of 444.08. The amount in cell C5 is made negative because the
loan is decreasing.

The PMT function can also be used to calculate regular payment needed to save
towards a specific sum of money, in a known time period, e.g. money needed for
a holiday, or for school fees, etc.

Example 2:
You would like to purchase a new car in 12
months time, and estimate you will need
10,000 to do so. How much do you need to
save each month if you know the interest rate
for that period will be 5%?
This time you know the future value rather
than the present value. Notice there is an empty argument in the PV position
indicated by two commas.
You would need to save 814.41 per month.
Data tables
Data tables are part of a suite of commands sometimes called what-if analysis
tools. A data table is a range of cells that shows how changing certain values in
your formulae affects the results of the formulas. Data tables provide a shortcut
for calculating multiple versions in one operation and a way to view and
compare the results of all of the different variations together on your
worksheet.
For example, use a one-variable data table if you want to see how different
interest rates affect a monthly mortgage payment.
In the previous example the PMT function was used to calculate a single output
value (i.e. the monthly payment) based on three input values (i.e. the rate, the
term and the loan amount). Often in such calculations it is of interest to see
how the repayments would change over a range of input values.
Although it would be possible to change the interest rate (C3) manually, a data
table provides a much easier way to see what the repayments would be for
several different rates of interest (or any other input variable) at once.

One-input data table


1. Key in the different rates of interest down a column, and format them as
percentages (with two decimal places if necessary). In the following example
they start in cell B7. The function containing the formula should be located
in the cell to the right of the first of the new interest rates. In the example
below this would be cell C7.
2. Select the cells containing the
PMT function and the range of
percentages, together with their
adjacent cells (in this example
cells B7:C15).
3. On the Data menu, select
Table.
4. As the values to be substituted
are in a column, in the Column Input Cell box, enter the cell reference
which contains the interest rate, i.e. C3.
5. Click OK.
6. The table of values is automatically filled in, changing the repayments for
different interest rates. Format the repayment figures as currency to two
decimal places.
7. Now try changing the loan amount in cell C5 to check that the table
recalculates.
Two-input data table
A two-input table is used to see how two variables in a formula affect the result.
For example, as well as varying the interest rate of a loan, what affect does the
length of the loan have on repayments?
A two-input data table
needs input for both the
row and column of the
table.
This time the formula
must be in the cell in the
top left-hand corner of the
table (B7).
1. The term periods are
entered across the top
of the table, and the
various interest rates
down the left-hand side as before.
2. The entire table is selected and then the Table option is selected from the
Data menu. The Row Input Cell is the cell containing the term, in this
example cell C4. The Column Input Cell is the interest rate and stays the
same as before, i.e. cell C3.
3. When OK is clicked the
table will be filled
automatically with the
various repayment
amounts for the
different rates of
interest over the
various loan terms. The
cells may need
formatting as currency
to two decimal places.

Other uses of data tables


Data tables are not only used to calculate loan repayments. Any function can be
used as the basis for an input data
table.
In this example the table calculates
how much money will be taken by a
holiday park, depending on how
many chalets are rented out and the
amount charged. The formula in the
top left-hand cell of the table is just
the number of chalets rented, i.e. cell C3 multiplied by the amount charged,
cell C4.
The original values of cells C3 and C4 can be left blank.
Helpful hint:
Excel automatically recalculates Data tables whenever a worksheet is recalculated, even if they have not
changed. To speed up calculation of a worksheet that contains a data table, you can change the Calculation
options to automatically recalculate the worksheet but not data tables by selecting Automatic except tables in
Tools|Options|Calulation.
Learning more
Central IT training
Information Systems runs courses for UCL staff, and publishes documents for
staff and students to accompany this workbook as detailed below:
Getting started with This 3hr course is for those who are new to
Excel spreadsheets or to Excel, and wish to explore the
basic features of spreadsheet design. Note that it
does not cover formulae and functions.
Getting more from This 3hr course is for users of Excel who wish to
Excel (no formulae or learn more about the non-mathematical features of
functions) Excel and to work more efficiently.
Using Excel to manage This 3hr course is for those already familiar with
lists Excel who would like to use some of its basic data-
handling functions.
Excel formulae and This 3hr course is aimed at introducing users, who
functions are already familiar with the Excel environment, to
formulae and functions.
More Excel formulae This 3.5hr course is aimed at competent Excel users
and functions who are already familiar with basic functions and
would like to know what else Excel can do and try
some more complex IF statements.
Advanced formulae This 3.5hr course is aimed at competent Excel users
and functions who are already familiar with basic functions. It
aims to introduce you to functions from several
different categories so that you are equipped to try
out other functions on your own.
Excel statistical This course aims to introduce you to built-in Excel
functions statistical functions and those in the analysis tool
pack. The course covers major descriptive,
parametric and non-parametric measures and tests.
Excel statistical This course covers best practise in constructing
formulae complex statistical formulae in spreadsheets using
common statistical measures as example material.
Excel tricks and tips This is a 2hr interactive demonstration of popular
Excel shortcuts. It aims to help you find quicker
ways of doing everyday tasks. This fast-paced course
is also a good all-round revision course for
experienced Excel users.
Pivot tables Pivot tables allow you to organise and summarise
large amounts of data by filtering and rotating
headings around your data. This 2hr course also
shows you how to create pivot charts.
Advanced Excel Data This course aims to help you learn to use some less
analysis tools common Excel features to analyse your data.
Advanced Excel Would you like to customise and automate Excel to
Setting up and perform tasks you do regularly? If you are an
automating Excel experienced user of Excel, then this course is for
you.
Advanced Excel Do you share workbooks with others? Would you like
Importing data and to see who has updated what? Do you know how to
sharing workbooks import data from text files or databases? This course
aims to show you how.

These workbooks are available for students at the Help Desk.

Open Learning Centre


The Open Learning Centre is open every afternoon for those who wish to
obtain training on specific features in Excel on an individual or small group
basis. For general help or advice, call in any afternoon between 12:30pm
5:30pm Monday Thursday, or 12:30pm 4:00pm Friday.
If you want help with specific advanced features of Excel you will need to
book a session in advance at: www.ucl.ac.uk/is/olc/bookspecial.htm
Sessions will last for up to an hour, or possibly longer, depending on
availability. Please let us know your previous levels of experience, and what
areas you would like to cover, when arranging to attend.
See the OLC Web pages for more details at: www.ucl.ac.uk/is/olc

Online learning
There is also a comprehensive range of online training available via
TheLearningZone at: www.ucl.ac.uk/elearning

Getting help
The following faculties have a dedicated Faculty Information Support Officer
(FISO) who works with faculty staff on one-to-one help as well as group
training, and general advice tailored to your subject discipline:
Arts and Humanities
The Bartlett
Engineering
Maths and Physical Sciences
Life Sciences
Social & Historical Sciences
See the faculty-based support section of the www.ucl.ac.uk/is/fiso Web page for more
details.
A Web search using a search engine such as Google (www.google.co.uk) can also
retrieve helpful Web pages. For example, a search for "Excel tutorial would
return a useful selection of tutorials.