1.2 Microsoft Excel Functions
1.2 Microsoft Excel Functions
.....
.....
WISEMAN
PART-TIME CLASSES
. . . . .
. . . . .
. . . . .
. . . . .
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 65 18 22 . . . . .
. . . . .
COMPUTER APPLICATIONS II
( CAP 31201 )
BASIC MS EXCEL FUNCTIONS
INTRODUCTION
▪ In mathematics, finance and science among others many
problems require to work with numerical data.
▪ Problems are simplified if the formula is known.
▪ Microsoft excel allows the user to create a formula or use
predefined formulae known as functions.
▪ This presentation introduces you cell referencing and
fundamental functions which are commonly used in
mathematics, finance, statistics as well as science.
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 3
LESSON 1
INTRODUCTION
DATA,
TO FORMULAS &
INFORMATION
ERROR MESSAGES &
SYSTEM CONCEPTS
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 4
LESSON 1 - Objectives
By the end of this lesson, you should be able to;
a. Differentiate between a formula and a function
b. Create simple formula in Microsoft Excel
c. Describe how spreadsheet performs calculations
d. Identify and correct errors associated with functions
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 5
LESSON 1 - Terminologies
Make sure you understand the following terms;
▪ Formula
▪ Functions
▪ Syntax
▪ Function name
▪ Argument
▪ Algorithm
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 6
Terminologies – Formula
Formula
A formula is an equation that performs calculations on
values in your worksheet.
▪ An Excel formula starts with an equal sign (=).
▪ For example, the following formula add 3 to 1 can be
entered as =3+1
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 7
Terminologies – Function
Function
A function is a built-in (predefined) mathematical formula
that performs a specific calculation or operation.
▪ Function simplifies the operations
▪ Examples of functions include; sum, average, replace,
count, if, iferror e.t.c
▪ A formula on the previous slide can be written as
=sum(3,1)
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 8
Formula – Parts of a formula
Parts of an excel formula
An excel formula has the following parts
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 9
Formula – Parts of a formula cont…
b. Function name
▪ The function name identifies the
operation to be performed
▪ The function = 𝐬𝐮𝐦(𝟑,𝟏) (the
function name is sum) returns the
summation of 3 and 1.
▪ Press the enter key to see the results
(See cell A1).
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 10
Formula – Parts of a formula cont…
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 11
Formula – Parts of a formula cont…
d. Argument
Is the value or a reference the function uses to perform a
specific calculation.
▪ Values (Constants) are numbers or text values entered
directly into a formula. For example, entering 5 instead
of A2 if 5 is in cell A2.
▪ References are used when referring to a cell or cell
range e.g A2 can be used when referring to a cell
whereas A2:D3 when referring to the cell range.
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 12
Formula – Parts of a formula cont…
e. Operators
These are symbols that specify the type of calculation or
operation to be performed.
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 15
Formula – Entering functions
Entering Formulas with Functions
To enter and use the formula effectively, you must know
what formula to use, its syntax and when to use it.
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 16
Formula – Entering functions cont…
Formula AutoComplete
Helps you enter a formula with a valid function name and
arguments.
▪ As you begin to type the function name, a list of
function names appears below the active cell.
▪ Select the function you want, enter an open parentheses,
the order of arguments appears, fill in the arguments
then press enter.
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 18
Formula – Order of operations
Algorithm (Order of operations)
Is the sequence of steps or rules to be followed in
mathematical operations.
Example
▪ Using the order in Microsoft Excel, show step by step
how the formula = 20/(8 − 4) ∗ 8 − 2 is calculated
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 20
Formula – Order of operations cont…
Solution
=20/(8-4)*8-2 (Calculate operations in parentheses first)
∴=8−4=4
=20/4*8-2 (Division comes first before multiplication)
∴ = 20/4 = 5
=5*8-2 (Multiplication takes place)
∴ = 5 𝑥 8 = 40
=40-2 (Subtraction takes place) ∴ = 40 − 2 = 38
∴ = 𝟑𝟖
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 21
Formula – Error messages
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 22
Formula – Error messages cont…
The following are some of the errors you will be
encountering;
1. ##### – Obtained when the cell size is small
▪ Correct the error by adjusting the cell size
2. #Div/0! – When a number is divided by zero (0) or a
blank cell
▪ To correct, Do not divide by zero (0) or a blank cell
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 23
Formula – Error messages cont…
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 24
Formula – Error messages cont…
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 27
Practice questions – Question one cont…
Question 1.3
a. State the order of sequence of operating mathematical
operations in Excel
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 28
Practice questions – Question one cont…
Question 1.4
a. List any 5 errors you would probably encounter when
working with Excel.
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 29
LESSON 2
CELL REFERENCING
DATA,
IN MS EXCEL
INFORMATION &
SYSTEM CONCEPTS
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 30
LESSON 2 - Objectives
By the end of this lesson, you should be able to;
a. Describe what cell reference is
b. Link different worksheets within or with different
workbooks
c. Differentiate between different types of cell
referencing
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 31
LESSON 2 - Terminologies
Make sure you understand the following terms;
▪ Cell referencing
▪ Relative cell referencing
▪ Absolute cell referencing
▪ Mixed cell referencing
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 32
Terminologies – Cell referencing
Cell referencing
Is defined as using the values or properties of the cell or
range in another cell.
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 33
Cell referencing – Referring to a sheet
Referring to a sheet
This means creating a link between the current and other
worksheets.
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 34
Cell referencing – Referring to a sheet cont…
You can refer to a sheet;
a. within the workbook (current workbook)
b. in another workbook either opened or closed.
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 35
Cell referencing – Referring to a sheet cont…
a. Referring within a workbook
▪ Given book1.xlsx with 3 sheets named sheet1, sheet2
and sheet3. We would like to use the contents of B10 in
sheet2 in active cell A5, sheet1. To do this enter
=Sheet2!B10 in A5, sheet 1.
▪ This returns the value of cell B10 sheet2 in A5 sheet1
▪ The general syntax to refer to a sheet within a workbook
is =Sheetname!cell_Address
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 36
Cell referencing – Referring to a sheet cont…
▪ Sometimes it happens that you are referring to different
sheets but the data is in the same cell-address e.g B10 in
all sheets.
▪ To refer to a same cell address but in two or more
worksheets, the general syntax is;
=FirstSheetname:LastSheetname!Cell_Address
▪ For example =sum(Sheet1:Sheet3!A1) (Adds data of all
cells named A1 in sheet1, sheet2 and sheet3)
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 37
Cell referencing – Referring to a sheet cont…
b. Referring to another workbook
i. Opened workbook.
▪ We are in A2, sheet1 of Book1.xlsx and would like to
use the contents of B5, sheet1 of opened Book2.xlsx
▪ To do this we enter =[Book2.xlsx]sheet1!B5 in our
active cell (in this case A2, sheet1 of book1.xlsx)
▪ In general the syntax to refer to an opened workbook
is =[File_name]Sheetname!Cell_address
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 38
Cell referencing – Referring to a sheet cont…
ii. Closed workbook.
▪ We are in A2, sheet1 of Book1.xlsx and would like to
use the contents of B5, sheet1 of closed Book2.xlsx
located in directory desktop which is a subdirectory to
directory Users under drive C. To do this we type
=‘C:\Users\Desktop\[Book2.xlsx]Sheet1’!B1 in our
active cell (in this case A2, sheet1 of book1.xlsx)
▪ In general the syntax to refer to a closed workbook is
=‘Path\[File_name]Sheetname’!Cell_address
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 39
Types of cell referencing
Types of cell referencing
The following are different types of cell referencing;
a. Relative cell referencing
b. Absolute cell referencing
c. Mixed cell referencing
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 40
Types of cell referencing – Relative
a. Relative cell referencing
In this referencing, the formula adjusts to its new location
when it is copied or moved.
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 41
Types of cell referencing – Relative cont…
Let’s look at the spreadsheet
The following will be the results
below and fill the blank cells in blank cells;
A B C
A1 =F4*N7 B1 =G4*O7
1 A2 =F5*N8 B3 =G6*O9
2 =G5*O8 A3 =F6*N8
3 C1 =H4*P7
▪ What will be the results if C2 =H5*P8
the formula in cell B2 is C3 =H6*P9
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 43
Types of cell referencing – Absolute cont…
Let’s look at the spreadsheet
below and fill the blank cells Since the whole formula is
A B C locked, it will not change
1 when copied to the new cells.
2 =$F$5*$N$8
3 Therefore, all blank cells will
have the same formula;
▪ What will be the results if
the formula in cell B2 is =$F$5*$N$8
copied to fill the blank cells?
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 44
Types of cell referencing – Mixed referencing
c. Mixed cell referencing
▪ Has either relative column and an absolute row or an
absolute column and a relative row
i. Relative column and an absolute row e.g =F$5*N$2
▪ Columns adjust but rows do not
ii. An absolute column and a relative row e.g =$F5*$N2
▪ Columns do not adjust but rows do
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 45
Practice questions – Question two
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 46
Practice questions – Question two cont…
Question 2.2 A B C D E
Use the table to answer 1 1000 115 700
the question below; 2 4567.33 100 5K
3 #REF 0 678
a. Explain how you can correct an error in cell A3
b. What formula should be in cell C1 to result the value 700 being maintained
in cell C1
c. Given that cell D1 contains the formula =$A$2/B1;
i. Give the values you will obtain in D1 through E3
ii. Write the errors obtained in cell D3 and E2 and state how each
can be corrected.
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 47
Practice questions – Question two cont…
Questions 2.3
A business man used Microsoft excel to analyze his monthly
business sales report. He named the sheets based on the month
names. On excel sheet representing the month of April, his total
sales value was summed in cell L20 and for the month of May,
the total sales were in cell M24. Write an excel formula to sum
up the two sales for April and May and representing them on
the excel sheet of June in A6.
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 48
Practice questions – Question two cont…
Questions 2.4
a.Mary would like to add the average of values in cells Q1:Q5
of Microsoft Excel worksheet 1 and to the sum of a range
A1:A10 in worksheet 4 and that the answer should appear in
cell Q6 of worksheet 1. What formula should she use?
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 50
LESSON 3
WORKING WITH
DATA,
FUNDAMENTAL
INFORMATION
FUNCTIONS &
SYSTEM CONCEPTS
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 51
LESSON 3 - Objectives
By the end of this lesson, you should be able to;
a. Describe different types of functions
b. Use functions effectively
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 52
Types of functions
Types of spreadsheet functions
▪ Text functions ▪ Lookup and reference
▪ Logical functions ▪ Engineering functions
▪ Mathematics & Trigonometry ▪ Cube functions
▪ Statistical functions ▪ Information functions
▪ Financial functions ▪ Compatibility functions
▪ Date and time functions
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 56
Types of functions – Text functions cont…
h. Ampersand (&) – Also used to join text strings
▪ Syntax =Text1&Text2… Joins without a space
=Text1&“ ”&Text2… Joins with a space
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 58
Practice questions – Question three cont…
Questions 3.2
A first year student wanted to write the word “Bunda” in
uppercase, unfortunately he typed “bungans” in cell Q1,
As an expert in Microsoft Excel, write Excel formula
which he should use to emend the spelling.
Questions 3.3
Write an excel formula you can use to join “COHORT”,
and “THREE” so that they appear as “city, state”.
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 59
Types of functions – Logical functions
2. Logical functions
a. And – Compares two or more conditions and returns TRUE if
and only if all conditions are met, otherwise it returns FALSE
▪ Syntax =And(condition1,condition2,...)
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 60
Types of functions – Logical functions cont…
c. Not – Changes FALSE to TRUE, and TRUE to FALSE
▪ Syntax =Not(logical)
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 61
Types of functions – Logical functions cont…
e. If – Checks whether condition is met and returns one value
if TRUE and another if FALSE
▪ Syntax =IF(Logical_test,value_if_TRUE,value_if_FALSE)
To calculate the totals for the purchase you insert the formula
=$B2*$C2 in cell D2 and later auto fill the adjacent cells to the
cell D4
a. Write the excel formulas which will be in cell D3 and D4
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 64
Practice questions – Question four cont…
Questions 4.2 cont…
b. What error will be displayed in cell D4? Explain how
you would correct it.
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 66
Practice questions – Question four cont…
Question 4.4
Use this A B C D E F
table to 1 Employee Gross Salary Tax Salary Amount Rate
answer the 2 John 50000 First 40,000 0%
questions 3 Mary 45000 Next 5000 10%
below 4 James 60000 Excess 35%
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 69
Types of functions – Maths and Trig functions cont…
g. Power – Returns the result of a number raised to the power
specified
▪ Syntax =Power(number,power)
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 71
Types of functions – Maths and Trig functions cont…
l. Rounddown – Rounds a number down towards zero (0)
▪ Syntax =Roundown(number,num_digits)
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 72
Types of functions – Maths and Trig functions cont…
o. Sum – Adds all the arguments
▪ Syntax =Sum(number1,number2,number3,…)
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 73
Practice questions – Question five
Given that;
i. D2 = C2 expressed as integer
ii. E2 Contains a formula to round C2 to the nearest 10
Provide the resulting answers for all blank cells
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 75
Practice questions – Question five cont…
Question 5.3
The table here A B C D E
1 VILLAGE AGE SEX DATE VAC. WEIGHT
shows vaccine
2 Chiseka 25 Male 22/06/2022 60.00
distribution in three
3 Pondamali 30 Male 22/06/2022 65.75
villages. Study it 4 Chiseka 28 Female 22/06/2022 68.99
and answer the 5 Guzani 25 Male 22/06/2022 55.00
questions that 6 Chiseka 30 Female 22/06/2022 61.89
follow;
a. What an excel formula can be used to sum the weight
of male individuals aged 28 years and above.
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 76
Practice questions – Question five cont…
Questions 5.3 cont…
b. What is the solution if you round the total ages for
Chiseka individuals to the nearest 100?
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 77
Practice questions – Question five cont…
Question 5.4
The table here A B C D
shows disease cases 1 VILLAGE AGE DISEASE CASES
in Chitheka Area 2 Mtuma 12 Malaria 22
reported in January, 3 Mwanjawira 15 Pneumonia 65
2024. Use it to 4 Mtuma 4 Headache 34
5 Mwanjawira 9 Malaria 22
answer questions on
6 Mtuma 7 Peumonia 30
next slide.
7 Mwanjawira
Cases per village
8 Mtuma
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 78
Practice questions – Question five cont…
Questions 5.4 cont…
a.Write an excel formula which should sum and find the total
number of malaria cases specified in the disease column.
b.Write an excel formula in cell D7, which can be copied down
the column to summarize the number of cases reported for
Questions 3.3
each of the two villages.
c.Write an excel formula which should sum the total cases for
individuals of 7 years and above for Mtuma village.
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 79
Types of functions – Statistical functions
4. Statistical functions
a. Min – Returns the minimum number in a list of
arguments.
▪ Syntax =Min(number1,number2,number3,...)
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 81
Types of functions – Statistical functions cont…
f. Countif – Counts the number of cells within a range that
meet a given criteria or condition
▪ Syntax =countif(range, criteria)
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 82
Types of functions – Statistical functions cont…
h. Average – Returns the average of its arguments
▪ Syntax =average(number1, number2,...)
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 86
Practice questions – Question six cont…
Question 6.3
A B C D E F
1 46673.465 300 200 ####### G
2 6745.789 15.999 100 H
3 488.909 K100.00 0 I
4 8867.764 400 W J
5 576.234 230 50 K
6 P Q R S T U
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 88
Practice questions – Question six cont…
Questions 6.3 cont…
e. Write the formula to round the average of all numbers
above 500 in cell range A1:A5 to an integer value.
Questions
f. Write an 3.3
excel formula which should count numbers
that are not less than 500 in cell range A1:A5
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 89
Types of functions – Financial functions
5. Financial functions
a. PMT – Returns the periodic payment for a loan or an
investment
▪ Syntax =PMT(rate,nper,pv,[fv],[type])
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 91
Types of functions – Date and time functions
6. Date and time functions
a. Date – Returns a serial number of a particular date in
MS excel code
▪ Syntax =Date(year,month,day)
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 92
Types of functions – Date and time functions cont…
c. Now – Returns the serial number of the current date and
time
▪ Syntax =Now()
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 93
THE END
MAIN REFERENCES
Reynolds, G.W, and Stair, R.M, (2012),
Fundamentals of Information Systems (6th Ed.),
Course Technology, Cengage Learning, USA
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 94