0% found this document useful (0 votes)
28 views

Functions and Formula

The document discusses spreadsheet functions in Microsoft Excel. It explains what functions are, their syntax and components, and provides examples of common functions in different categories like math, statistical, financial and logical functions.

Uploaded by

Msambili Ndaga
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Functions and Formula

The document discusses spreadsheet functions in Microsoft Excel. It explains what functions are, their syntax and components, and provides examples of common functions in different categories like math, statistical, financial and logical functions.

Uploaded by

Msambili Ndaga
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

BASIC

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

© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.


1-3

Spreadsheet Functions

© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.


1-4

Spreadsheet Functions
A function is a calculation shortcut to some (possibly, complex)
formula.

Every function is based upon some predefined formula, working


behind the scene.

Functions allow the users to avoid the mathematical details of


complex calculations.

For Example:
Function =SUM(A1,A2,A3) is based upon the sum formula =A1+A2+A3.

© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.


1-5

Spreadsheet Functions Components

Function Syntax
Function name (spelling),
Right order of different function parts (argument sequence.)
Proper use of comma, parentheses and other punctuations.

Function Arguments (parameters)


The values/ cell references, the function needs to work upon
for result calculation.
Number of arguments could be fixed or unlimited depending
upon the nature of the function used.

Function Result
Every function results only in one value.

© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.


1-6

Spreadsheet Functions Components

General Function Syntax


Function Name( argument1, argument2, ………)
Function Examples
Function with variable number of arguments
SUM(A1, A2, A3) - adding 3 values
SUM(A1, A2, A3,A4,A5) – adding 5 values

Function with fixed number of arguments


SQRT(A1) – finding the square root for A1
ROUND(A1,2) – return the decimal value in A1
with 2 digits after decimal point.

© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.


1-7

Use of Functions in Spreadsheet


Programs

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.

© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.


1-8

Use of Cell Ranges in Function


Arguments

Cell ranges is a shortcut for specifying multiple


contiguous cells by one concise expression.

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

….Use of Cell Ranges

Examples (Valid & Invalid Cell


Range Expressions in Microsoft Excel)
C1:C5 Valid, all cells in the column C
between row 1 & 5 (5 cells).

C5: C1 Invalid, first cell (C5) is greater than


the last one (C1) in rows.

A1: C5 Valid, include all cells in


the square region A1 till C5.

© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.


1-10

….Use of Cell Ranges


Using 3D Sheet Reference in Microsoft Excel
[Beginning Sheet] : [Ending Sheet] ! [Cell Range]

Examples (Microsoft Excel)


Sheet1:Sheet3!A1
Valid, includes cell A1 from Sheet1, Sheet2
& Sheet3.

Sheet1!A1 : Sheet3!A1
Invalid syntax.

Sheet1:Sheet3!A1:A3
Valid, includes cells A1:A3 from all 3
sheets (9 cells)

© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.


1-11

Using Function in Microsoft Excel


Microsoft Excel provides an
easy to use interface for using
functions.

Paste Function Window


Categorizes the big function
list into smaller sub-lists.

Alphabetically ordered.

Provides help while


selecting arguments.

© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.


1-12

Naming Cells & Cell Ranges

While writing formulas, meaningful cell names are more


desirable than their coded references.
=unit_price * no_of_units - easier to understand
=A3 * B5 – difficult to interpret.

How to define names? (Microsoft Excel)


Position the cursor on the cell OR select the cell range.
Go to name box.
Write the meaningful name to be used.

Names could be given to


Single cells
Contiguous cells
Non- contiguous cells

© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.


1-13

..Naming Cells & Cell Ranges


Examples of Cell
Naming in Microsoft
Excel
Single Cell

Contiguous Range

© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.


1-14

Function Examples in
Microsoft Excel
Microsoft Excel provides a long list of functions in different application areas like
finance, statistics, trigonometry etc.

Math & Trigonometry – Functions implementing useful mathematical & Trigonometry


formulas.
RAND( ) ● Returns a random value between 0 and 1.
ROUND( X, Y) ● Returns the value X with Y digits after decimal point.
SIN( X ) ● Returns the Sin for X.

Examples:
Automatic Recalculation
=RAND( ) 0.102938421 0.345809321

=ROUND( 12.4352, 3) 12.435

=SIN( PI( )/3 ) 0.8660254037

© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.


1-15

Function Examples in
Microsoft Excel

Statistical - Functions used to give summary information about a


collection of values.
COUNT( X:Y ) ● Returns the count of numerical values in the X:Y.
AVERAGE( X:Y) ● Returns the mean value in the list X:Y.
STDEV( X:Y) ● Returns the standard deviation of the list X:Y

Examples:

=COUNT( A1:A5) 4

=AVERAGE(A1:A5) 5.5
Skip the non-
numeric values in =STDEV(A1:A5)
the list.

© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.


1-16

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.

© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.


1-17

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.

AND( logical1, logical2, ….)


Checks whether all arguments are TRUE, and returns TRUE if all
arguments are TRUE.

OR( logical1, logical2, ….)


Checks whether any of the arguments are TRUE, and returns TRUE or
FALSE. Returns FALSE only if all arguments are FALSE.

© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.


1-18

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

© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.


1-19

Function Examples in
Microsoft Excel
Logical Function Examples:
Nested IF Functions ● for more than two alternatives.

=IF(Age>60, “Retired”, IF (Age>50, “Close”, ”Still Young”) )

Retired

Close
AGE 52

Still Young

© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.


1-20

Use of IF with other functions

COUNTIF
Count only those cells which fulfill some criterion

SUMIF
Sum only those cells which fulfill some criterion

© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.


1-
21AZ

Function Examples in
Microsoft Excel

Text Functions - Used to manipulate text values.


CONCATENATE( text1, text2,…) ● Returns a
combination of all text values.
LEFT(text1, n) ● Returns first n characters starting from
left most character.

Examples:
Names
MIS =CONCATANATE( A2, A3) MIS105
105
KFUPM
=LEFT( A4, 3) KFU

© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.


1-22

Function Examples in
Microsoft Excel

Date & Time Functions - Used to manipulate date


and time values.
TODAY( ) ● Returns a serial number which represents
today’s date.
YEAR( serial_number ) ● Returns the year
corresponding to the serial number (date value)
Examples:
=TODAY() 3/4/2002

=YEAR ( TODAY() ) 2002

© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.

You might also like