Functions and Formula
Functions and Formula
APPLICATION
SOFTWARE
1-2
Lecture Objectives
Explaining Spreadsheet Functions
Use of Cell/ Range Naming in
Spreadsheet Functions
Function Examples in Microsoft Excel
Financial Functions
Logical Functions
Math/ Statistical Function
Lookup & Reference Functions
Data/ Time Functions
Spreadsheet Functions
Spreadsheet Functions
A function is a calculation shortcut to some (possibly, complex)
formula.
For Example:
Function =SUM(A1,A2,A3) is based upon the sum formula =A1+A2+A3.
Function Syntax
Function name (spelling),
Right order of different function parts (argument sequence.)
Proper use of comma, parentheses and other punctuations.
Function Result
Every function results only in one value.
Microsoft Excel
Similar in use as a formula (must start with =).
Can be extended to a formula by using operators &
other operands.
=SUM(A1,A2,A3)/3.0 -calculating average of 3 values.
=AVERAGE(A1:A3) – calculating average of A1, A2 & A3.
Lotus 1-2-3
Must start with @.
@SUBTOTAL(C3..C5) -calculating total of C3, C4 & C5.
General Syntax:
[Beginning Cell] [Separator] [Ending Cell]
Where
Beginning Cell reference can not have a higher value of
row or column when compared with the Ending Cell.
Separator character may be different in different
spreadsheet packages.
Microsoft Excel Separator = :
Lotus 1-2-3 Separator = ..
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
1-9
Sheet1!A1 : Sheet3!A1
Invalid syntax.
Sheet1:Sheet3!A1:A3
Valid, includes cells A1:A3 from all 3
sheets (9 cells)
Alphabetically ordered.
Contiguous Range
Function Examples in
Microsoft Excel
Microsoft Excel provides a long list of functions in different application areas like
finance, statistics, trigonometry etc.
Examples:
Automatic Recalculation
=RAND( ) 0.102938421 0.345809321
Function Examples in
Microsoft Excel
Examples:
=COUNT( A1:A5) 4
=AVERAGE(A1:A5) 5.5
Skip the non-
numeric values in =STDEV(A1:A5)
the list.
Function Examples in
Microsoft Excel
Financial – Functions for financial calculations.
PMT(rate, nper, pv, fv, type)
Calculates the payment for a loan based on constant
payments and a constant interest rate.
FV(rate, nper, pmt, pv, type)
Returns the future value of an investment based on
periodic, constant payment and a constant interest rate.
Function Examples in
Microsoft Excel
Logical Functions -
IF( logical_test, value_if_true, value_if_false)
Checks whether a condition is met, and returns one value if TRUE, and
another value if FALSE.
Function Examples in
Microsoft Excel
Logical Function Examples:
IF Function
Retired
=IF(Age>60, “Retired”, “Back to work”)
Back to work
AND Function
Distinction
Average
=IF( AND(Math>75, English>75) “Distinction”, “Average”)
Average
Average
Function Examples in
Microsoft Excel
Logical Function Examples:
Nested IF Functions ● for more than two alternatives.
Retired
Close
AGE 52
Still Young
COUNTIF
Count only those cells which fulfill some criterion
SUMIF
Sum only those cells which fulfill some criterion
Function Examples in
Microsoft Excel
Examples:
Names
MIS =CONCATANATE( A2, A3) MIS105
105
KFUPM
=LEFT( A4, 3) KFU
Function Examples in
Microsoft Excel