MS Excel (Advanced Functions)
MS Excel (Advanced Functions)
Lesson Notes
Author: Pamela Schmidt
Round Function
=ROUND(cell,number of digits to round)
i.e. cell D2 = 45.256
=round(d2,1) would return 45.3
=round(d2,2) would return 45.26
=round(d2,-1) would return 50
=round(d2,-2) would return 0
Using the format of a number to round only changes it for display and printing it does not
change it for calculations.
MS Excel: Level 2
Payment Function
=PMT(interest rate,total number of payments,principal,future value,type)
Type is a 0 or 1 indicting when the payment is due.
0 or omitted = At the end of the period
1 = At the beginning of the period
Future value and type are optional arguments.
Note: be sure interest for year is divided by 12
Note: PMT function should be preceded by a minus to display a positive number.
Countif Function
The countif function will count how many cells within a range meet the criteria or test.
COUNTIF(range,criteria)
Range = range to check
Criteria = test
If Function
A simple If function will allow a cell to change depending on a conditional test.
In the example
test
displays nothing.
Embedded If Function
An embedded If function will allow a cell to change depending on multiple conditional tests.
=IF(test, what to do if it is true, IF(test, what to do if it is true, what to do if it is false))
In the example
test
test
if the quantity on
hand in column F
is less than or
equal to column I
if true
display the
statement level
low
if false
displays nothing
IS Functions
IS functions test the value of a cell.
Function
ISBLANK(value)
ISERR(value)
ISERROR(value)
ISLOGICAL(value)
ISNA(value)
ISNONTEXT(value)
ISNUMBER(value)
ISREF(value)
ISTEXT(value)
Returns TRUE if
Value refers to an empty cell.
Value refers to any error value except #N/A.
Value refers to any error value (#N/A, #VALUE!, #REF!, #DIV/0!, #NUM!,
#NAME?, or #NULL!).
Value refers to a logical value.
Value refers to the #N/A (value not available) error value.
Value refers to any item that is not text. (Note that this function returns TRUE
if value refers to a blank cell.)
Value refers to a number.
Value refers to a reference.
Value refers to text.
ISERROR
Errors can occur in a cell for several reasons, such as a division by zero. The ISERROR
function tests for an error. The ISERROR function can be used in conjunction with the IF
function.
Lookup
The Lookup Function can be used to pull information from one worksheet into another
worksheet. i.e. a user could enter a part number on one sheet and it would pull the
description and cost from another sheet.
There are two types of Lookup Functions: vector and array.
LOOKUP(lookup_value,lookup_vector,result_vector)
Lookup value = cell on first sheet to be looked upon the second sheet.
Lookup vector = range of cells on second sheet in which the function should look for the cell
referenced on the first sheet. (Note: the lookup numbers must be in alphabetical order.)
Result vector = range of cells on second sheet that holds the information to be pulled into
the first sheet.
Note: if the formula is to be copied, be sure to use absolute referencing where needed.
Database Functions
MS Excel has functions built in for specific use with a database.
All of the database functions have the same arguments.(database,field,criteria)
Database: the range of your data including the field names (column headings)
Field: the field (column) that holds the values to be averaged. Use the field name in quotes
or the field number (count from left to right ie column D would be field number 4)
Criteria: the cells that hold the condition on which the values should be averaged.
Note: Named ranges can be used instead of cell addresses.
Examples from Microsoft Excel Help
Tree
Apple
Pear
Tree
Apple
Pear
Cherry
Apple
Pear
Apple
Height
>10
Height
18
12
13
14
9
8
Results
Age
Yield
Age
Profit
Yield
20
12
14
15
8
9
14
10
9
10
8
6
Formula
Height
<16
Profit
105
96
105
75
76.8
45
Description (Result)
DCOUNT(A4:E10,"Age",A1:F2)
This function looks at the records of apple trees between a height of 10 and 16 and
counts how many of the Age fields in those records contain numbers. (1)
DCOUNTA(A4:E10,"Profit",A1:F2)
This function looks at the records of apple trees between a height of 10 and 16 and
counts how many of the Profit fields in those records are not blank. (1)
105
DMAX(A4:E10,"Profit",A1:A3)
75
DMIN(A4:E10,"Profit",A1:B2)
225
DSUM(A4:E10,"Profit",A1:A2)
75
DSUM(A4:E10,"Profit",A1:F2)
The total profit from apple trees with a height between 10 and 16. (75)
140
DPRODUCT(A4:E10,"Yield",A1:B2)
The product of the yields from apple trees with a height greater than 10. (140)
12
DAVERAGE(A4:E10,"Yield",A1:B2)
13
DAVERAGE(A4:E10,3,A4:E10)
2.966479
2.6533
DSTDEV(A4:E10,"Yield",A1:A3)
DSTDEVP(A4:E10,"Yield",A1:A3)
The estimated standard deviation in the yield of apple and pear trees if the data in
the database is only a sample of the total orchard population. (2.97)
The true standard deviation in the yield of apple and pear trees if the data in the
database is the entire population. (2.65)
8.8
DVAR(A4:E10,"Yield",A1:A3)
The estimated variance in the yield of apple and pear trees if the data in the
database is only a sample of the total orchard population. (8.8)
7.04
DVARP(A4:E10,"Yield",A1:A3)
The true variance in the yield of apple and pear trees if the data in the database is
the entire orchard population. ( 7.04)
DAVERAGE(database,field,criteria)
Averages the values in a column of a list or database that match conditions you specify.
Example
The following will return the average value of all the fords on the list.
10
DCOUNT(database,field,criteria)
Counts the cells that contain numbers in a column of a list or database that match conditions
you specify.
Example
Returns the count of all the fords on the
list that have an amount in the value
column.
DGET(database,field,criteria)
Extracts a single value from a column of a list or database that matches conditions you
specify.
Example
The following will return the value of the only mazda on the list
If there had been NO mazdas on the list, the function will return #num
If there are more than one mazda on the list, the function will return #value
11
Time
TIME(hour,minute,second)
The Time Function converts separate hours, minutes, and seconds given as numbers to an
actual time
A
Time
Description
Amount
10:35:00 AM
Hours
10:35:00 AM
Minutes
10
10:35:00 AM
Seconds
30
Formula
Description (Result)
Weekday
WEEKDAY(serial_number,return_type)
The Weekday function returns a number to correspond to the day of the week for a specific
date.
return type
12
In the dialog box that appears, use the drop down box to choose Formula Is.
Notes/Comments
14
Reviewing Toolbar
The reviewing toolbar has several
comment tools.
Edit Comment
Previous Comment
Next Comment
Show/Hide Comment toggle
Show/Hide All Comments toggle
Delete Comment
15
Goal Seek
Goal Seek allows the user to dictate an answer to a formula. This works by allowing the
system to change a cell containing a constant used in the formula.
To use Goal Seek, click on a formula, then from the menu choose
Tools, Goal Seek.
Set cell
To value
By changing cell
16