Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
21 views94 pages

1.2 Microsoft Excel Functions

The document provides an introduction to Microsoft Excel, focusing on basic functions and formulas, including cell referencing and error messages. It outlines objectives for lessons, key terminologies, and detailed explanations of formulas, functions, and the order of operations in Excel. Additionally, it includes practice questions to reinforce understanding of the concepts presented.

Uploaded by

lickezchihana
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)
21 views94 pages

1.2 Microsoft Excel Functions

The document provides an introduction to Microsoft Excel, focusing on basic functions and formulas, including cell referencing and error messages. It outlines objectives for lessons, key terminologies, and detailed explanations of formulas, functions, and the order of operations in Excel. Additionally, it includes practice questions to reinforce understanding of the concepts presented.

Uploaded by

lickezchihana
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/ 94

.....

.....
.....

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

a. The equals sign (=)


▪ Identifies the cell contents as a formula.
▪ Once you press equals sign, the address
name in the name box changes to an
operation e.g sum.

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…

c. Open and close parenthesis ( )


▪ Parenthesis are used to separate the arguments from the
function name.

▪ In other ways, the parenthesis enclose the arguments in


the function.

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.

Some examples of operators


▪ The caret (^) operator raises a number to a power
▪ The asterisk (*) operator multiplies two or more numbers.
▪ The forward slash (/) operator is used to find the quotient
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 13
Formula – Parts of a formula cont…
5
=average(sum(A1*B2,B5),B4)
1 2 3 2 3 4 4 43 4 3
From the above function;
1. An equals sign
2. Function name
3. Parentheses
4. Arguments
5. Operator
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 14
Formula – Syntax
Syntax
Refers to the set of rules that define how to write a formula.
▪ Basically, it specifies the order, structure, and punctuation
of a specific function.
▪ Functions may use different syntax but the general syntax
of a function contains an equals sign, function name,
parenthesis and arguments;
▪ The general syntax is =Function_name(arguments)

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.

The following steps will guide you to use different formulae;


1. Start the formula with an equal sign (=).
2. Select or enter the function you want to use.
3. Enter an open parentheses

LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 16
Formula – Entering functions cont…

4. Select or enter the arguments


▪ Use a comma (,) to separate arguments and not a
space e.g =average(A2,B4)
▪ Use a colon (:) to indicate a range e.g A1:A6
▪ Enclose non-numerical data with double quotation
marks (‘‘ ’’) e.g “Excellent”
▪ Do not format any text value or cell address
5. Match your parentheses then press ENTER
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 17
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.

The order in Excel is called P.E.M.D.A.S (PEMDAS)


1. Parentheses (operations enclosed in parentheses)
2. Exponential calculations i.e powers or exponents (^)
3. Multiplication and Division (whichever comes first)
4. Addition and Subtraction (whichever comes first)
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 19
Formula – Order of operations cont…

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

Error messages in Ms Excel


Errors are obtained when the syntax of a particular formula
is not followed.

It is quite important to know the following about errors in


excel
a. Identify what the error is
b. How to correct it

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…

3. #Name? – When a function name is mistyped


▪ Type the correct function name to correct this error

4. #Null! – When you remove the range operator.


▪ Do not remove a range operator, or undo the
removal by pressing Ctrl + Z to correct the error.

LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 24
Formula – Error messages cont…

5. #Value! – When a cell containing a number has been


divided, multiplied, subtracted, or added to a letter
▪ Do not include texts or letters in your calculations

6. #Ref! – When the cell reference in the formula has been


deleted.
▪ Do not remove the cell reference, or undo the
removal by pressing Ctrl + Z to correct the error.
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 25
Practice questions – Question one

Practice questions One


Question 1.1
With examples on each of the following, state the use of the
terms as used in Microsoft excel
a. Function
b. An argument
a. Syntax
a. Operator
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 26
Practice questions – Question one cont…
Question 1.2
State the difference between the following terms as used in
Excel
a. Cell address and an active cell
b. Worksheet and a workbook
c. Formula and function
d. Syntax and an algorithm

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

b. Using the order of sequence stated above, show how


Microsoft Excel will perform the calculation on the
following formula; =3^2-(20/4)*5+16

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.

b. State how you would correct each error stated in Q1.4a


above.

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.

▪ For example, We have data in D5 but we want to use the


same data in B2, this can be accomplished by entering;
=D5 in cell B2,

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.

▪ This allows the user to use the contents of another sheet


in the current sheet.

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.

▪ Columns adjust when moving to the right or left

▪ Rows adjust when moving up or down

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

copied to fill the blank cells?


LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 42
Types of cell referencing – Absolute
b. Absolute cell referencing
In this referencing, formula does not change when copied
or moved to a new cell or location.
▪ The formula uses dollar ($) sign which acts as a lock
for locking both columns and rows.
▪ The dollar sign is placed before the letter and number
to lock the columns and rows respectively e.g. =$A$1

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

Practice questions two


Question 2.1
Cell A2 contains the formula =B4*D8 and you have used auto
fill handle to fill data to the right and down of Cell A2, provide
the resulting formula in Cell B2, B5 and in Cell D2.

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?

b.Write Microsoft excel formula in cell A5 in sheet1 of


book1.xslx which could return the contents of cell A5 in
Sheet1 of the opened file data.xslx.
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 49
Practice questions – Question two cont…
Questions 2.5
In cell D16 you have the following formula =$Q14*X19+$Z15.
If you auto fill the formula to cell H16, Write the formula that
will be in H16

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

We will discuss six functions only on the right hand side.


LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 53
Types of functions – Text functions
1. Text functions
a. Right – Returns the text string based on the number of
characters specified from the right
▪ Syntax =Right(text,num_chars)

b. Left – Returns the text string based on the number of


characters specified from the left
▪ Syntax =Left(text,num_chars)
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 54
Types of functions – Text functions cont…
c. Proper – Capitalizes the first letter of each word in a
text string
▪ Syntax =Proper(text)

d. Upper – Converts text to uppercase


▪ Syntax =Upper(text)

e. Lower – Converts text to lowercase


▪ Syntax =Lower(text)
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 55
Types of functions – Text functions cont…
f. Replace – Replaces a portion of text string with a
different text string based on the number of characters
you specify.
▪ Syntax =Replace(old_text,start,num_chars,new_text)

g. Concatenate - Is for joining text strings


▪ Syntax =Concatenate(text1, text2,..) Joins without space
=Concatenate(text1,“ ”,text2,...) Joins with a space

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

▪ Other text functions are: char, clean, code, dollar, exact,


find, search, fixed, len, T, mid, rept, substitute, trim,
value e.t.c.

▪ Explore more for knowledge at your free time.


LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 57
Practice questions – Question three

Practice questions three


Question 3.1
Innocent Enosh Nguluwe found that his name was
mistyped in cell A1 as follows; “iNnoCenTngUluWe”,
write any two excel formulas which he can use so that his
name appears as “Innocent Nguluwe” in cell B1.

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,...)

b. Or – Compares two or more conditions and returns TRUE if


any of the conditions is met, otherwise it returns FALSE
▪ Syntax =Or(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)

d. Iferror – Returns value_if_error if expression is an error


and the value of an expression itself otherwise
▪ Syntax =Iferror(calculation,value_if_error)

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)

f. Nested if – Used to make more than one decision before


calculating an answer. The IF function is nested/embeded
inside another IF function
▪ Syntax =IF(Logical_test,value_if_TRUE,IF(Logical_test,
value_if_TRUE,value_if_FALSE))
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 62
Practice questions – Question four

Practice questions four


Question 4.1
With one example on each, provide the syntax for
performing the following functions;
a. And
b. Iferror
c. If
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 63
Practice questions – Question four cont…
Question 4.2 A B C D
Study the spreadsheet 1 Item Quantity Price Total
and answer the 2 Notebooks 4 800.00
questions that follow; 3 Pens 10 400.00
4 School bag 1 K25,000.00

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.

c. Write an excel formula which you can insert in cell D2


Questions
and when 3.3
auto filled adjacent cells to cell D4, cell D4
must be empty instead of displaying an error identified
above?
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 65
Practice questions – Question four cont…
Question 4.3 A B
The able on this slide shows 1 Weather values (°𝑪) Results
some weather values and the 2 Below 20 Cold
results to be recorded. 3 20 to 30 Warm
4 Above 30 Hot

Write an excel formula in cell B2 to display either cold or


warm or hot whenever the whether values are typed in cell
A2.

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%

a. Write an Excel formula in C2 which could be used to


calculate the tax for John.
b. What is the monthly salary for James?
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 67
Types of functions – Maths and Trig functions
3. Mathematics and Trigonometry functions
a. Cos – Returns the cosine of an angle
▪ Syntax =Cos(number)

b. Sine – Returns the sine of an angle


▪ Syntax =Sin(number)

c. Tan – Returns the tangent of an angle


▪ Syntax =Tan(number)
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 68
Types of functions – Maths and Trig functions cont…
d. LN – Returns the natural logarithm of a number
▪ Syntax =LN(number)

e. Log – Returns the logarithm of a number to specified base


▪ Syntax =Log(number,base)

f. Sqrt – Returns the square root of a number


▪ Syntax =Sqrt(number)

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)

h. Rand – Returns a random number between 0 and 1


▪ Syntax =Rand()

i. Randbetween – Returns a random number between the


numbers specified
▪ Syntax =Randbetween(bottom,top)
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 70
Types of functions – Maths and Trig functions cont…
j. Round – Rounds a number to a specified number of digits
▪ Syntax =Round(number,num_digits)
i. A zero (0) digit indicates a whole
ii. A +ve digit rounds to decimal points
iii. A –ve digit rounds to the nearest e.g -1 = 10, -2 =
100 e.t.c

k. Roundup – Rounds a number up away from zero


▪ Syntax =Roundup(number,num_digits)

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)

m. Product – Multiplies all the numbers given as arguments


▪ Syntax =Product(number1,number2,number3,…)

n. Quotient – Returns the integer portion of division


▪ Syntax =Quotient(numerator,denominator)

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,…)

p. Sumif – Adds all cells that meet a given condition or criteria


▪ Syntax =Sumif(criteria_range,criteria,[sum_range])

q. Sumifs – Adds cells in a range that meet a multiple criteria


▪ Syntax =Sumifs(sum_range,range1,criteria1,range2,
criteria2, ….)

LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 73
Practice questions – Question five

Practice questions five


Question 5.1
With one relevant example on each, provide the syntax for
performing the following functions;
a. Round
b. Sumif
c. Sumifs
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 74
Practice questions – Question five cont…
Question 5.2 A B C D E
Study a spreadsheet 1 DATA SEX DATA INTEGER ROUNDED
given here and then 2 Point1 M 34.1
answer the questions 3 Point2 F 20.99
that follow; 4 Point3 M 50.4
5 Point4 M 26

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?

c. Write an excel formula that can sum the weight of all


Questions 3.3
female individuals.

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,...)

b. Max – Returns the maximum number in a list of


arguments.
▪ Syntax =Max(number1,number2,number3,...)
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 80
Types of functions – Statistical functions cont…
c. Count – Counts the number of cells in a range that
contains numeric data
▪ Syntax = count(value1,value2,value3,...)

d. Counta – Counts all non-blank cells in a given range


▪ Syntax =counta(value1,value2,value3,...)
e. Countblank – Counts empty cells in a given range
▪ Syntax =countblank(value1,value2,value3,...)

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)

g. Countifs – Counts the cells within a range that meet


multiple criteria or conditions
▪ Syntax =countifs(range1,criteria1,range2,criteria2,...)

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,...)

i. Averageif – Returns the average of its arguments that


meet a given criteria
▪ Syntax =averageif(range, criteria, [average_range])

j. Averageifs – Returns the average of its arguments that


meet a multiple criteria or conditions
▪ Syntax =averageifs(average_range,range1,criteria1,…)
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 83
Practice questions – Question six

Practice questions six


Question 6.1
With one relevant example on each, provide the syntax for
performing the following functions;
a. Countif
b. Countifs
c. Averageif
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 84
Practice questions – Question six cont…
Questions 6.2
Using the table of Disease cases report in Chitheka Area
on slide 78;
a. What an excel formula should be used to find the
Questions
minimum 3.3
number of cases reported?
b. Write an excel formula in cell D7, which can be copied
down the column to round the averages of the cases
reported for each of the two villages to the nearest 100.
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 85
Practice questions – Question six cont…
Questions 6.2 cont…
c. Write an excel formula which should find the average
cases for individuals of 7 years and above for Mtuma
village.

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

Using the table above;


a. Explain how you can correct an error in cell E1
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 87
Practice questions – Question six cont…
Questions 6.3 cont…
b. What values will result in cell H through K with excel
function =Round(A2,-3) copied from cell F2 down F5.
c. Write down the error you will get if you divide cell D3
Questions 3.3
by cell E2 How can you correct the error obtained
d. Provide an excel formula that will display ‘‘MORE’’
when the value of cell B1 is compared to that of D1

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])

b. PV – Returns the present value of a loan or investment


▪ Syntax =PV(rate,nper,pmt,[fv],[type])

c. FV – Returns the future value of a loan or an investment


▪ Syntax =FV(rate,nper,pmt,[pv],[type])
LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 90
Types of functions – Financial functions cont…
d. Nper – Returns the number of periods for a loan or an
investment
▪ Syntax =NPER(rate,pmt,pv,[fv],[type])

e. Rate – Returns the interest rate per period for a loan


▪ Syntax =RATE(nper,pmt,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)

b. Day – Converts a serial number to a day of a month


▪ Syntax =Day(serial_number)

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()

d. Today – Returns the serial number of today's date


▪ Syntax =Today()

e. Year – Converts a serial number to a year


▪ Syntax =Year(serial_number)

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

Munthali, E. and Mlozi, C. (2016), Computer


Applications II (Module 1), Information
Systems, Spreadsheet and Microsoft Excel,
LUANAR, MW

LUANAR – Bunda Campus | Innocent Enosh Nguluwe | BNWE | +265 884 651 822 | [email protected] 94

You might also like