0% found this document useful (0 votes)
29 views25 pages

4 - 2 Decisions and Functions

Uploaded by

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

4 - 2 Decisions and Functions

Uploaded by

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

DECISIONS AND

FUNCTIONS
Module 4.2
CO
IUMIF UP
UN
TI
S OFK
F DECISIONS AND
V L O

FUNCTIONS
Module 4.2
Content
3

 Calculations based on a decision or test


 The VLOOKUP function

 Test and improve your knowledge and


skills

CO
I IF

U
N
TI
M

F
FSU
VLO
O KUP
Calculations based on a
4 decision or test

CO
I IF

U
N
TI
M

F
FSU
COUNTIF and SUMIF functions
5

Function What the function does

= COUNTIF(range, Counts the number of cells in a range that


criterion) meet a certain criterion. Such a criterion
can be a number, text or expression.

=SUMIF(range, The cells in the sum_range which


criterion, correspond to the cells in the range that
meet the criterion are added together.
sum_range)
Example - application of the COUNTIF and
SUMIF functions
6
COUNTIf is used to count how many choir members are in
each grade.

The total amounts paid by the choir members in each grade is


calculated using SUMIF.

7
IF function
8

=IF(condition, value_if_true, value_if_false)

=IF(D2>800, “Gold”, IF(D2>=600, “Silver”, “Bronze”))

Condition Value_if_true Value_if_false


IF function
9

=IF(D2>800, “Gold”, IF(D2>=600, “Silver”, “Bronze”))

IF(D2>800
If the value is greater than 800, the
TRUE “Gold”
word Gold will be displayed,
otherwise the Value_if_false part is
FALSE executed.

This part consists of IF(D2>=600


the next IF function TRUE “Silver”
where the value in
D2 is tested again.
FALSE “Bronze”
IF function - Insert Function
10
Activity 1
11

CO
I IF

U
N
TI
M

F
FSU
Activity 2
12

TryNestedIF

ABC_printing

Overtime

Marks

CO
I IF

U
N
TI
M

F
FSU
The VLOOKUP function
13

VLOOKUP stands for Vertical Lookup which


means that a value is searched for from top to
bottom in a column.

K U P
VL OO
Looking up a specific value
14

=VLOOKUP(Lookup_value, Table_array, Col_index_num, Range_lookup)

The value you want to search for


The table where you search for the answer
The column number in the table where the answer is
Use FALSE if you want to search for an exact value

2nd column
Activity 3
15

CostsCourses

K U P
VL OO
Activity 4
16

BooksOutstanding

OnlineCourses

Increase_Stationer
y

StudyOppBooks

K U P
VL OO
Looking up a value in an interval
17
The following table To do the Only the minimum values of
shows how the conversion with each interval are stored in the
conversion must be the help of a lookup table in Excel.
done. VLOOKUP, the   A B
intervals must first 1 Marks Symbol
Marks Symbol be sorted from 2 0 H
smallest to largest. 3 10 G
90-100 A+ Marks Symbol 4 30 FF
80-89 A 0-9 H 5 34 F
70-79 B 10-29 G 6 40 E
60-69 C 30-33 FF 7 50 D
50-59 D 34-39 F 8 60 C
40-49 E 40-49 E 9 70 B
34-39 F 50-59 D 10 80 A
30-33 FF 60-69 C
11 90 A+
10-29 G 70-79 B
0-9 H 80-89 A
90-100 A+

When intervals are used, TRUE must be the last argument in the VLOOKUP
Activity 5
18

SchoolMarks

Medals

Bonuses_Gifts

K U P
VL OO
Test and improve your
19 knowledge and skills

CO
IUMIF UP
UN
TI
S O K

F
V L O
Summary of module
20

The COUNTIF and SUMIF functions


Hoy many Gr 11s?
COUNTIF How many boys? How many Gr 12s?
Counts the number of How many girls?
cells in a range with a
particular value
Summary of module
21

The COUNTIF and SUMIF functions


SUMIF
Adds the values of
those cells where the
corresponding column
has a certain value.

What is the total amount


paid by Gr 10?
Summary of module
22

The IF statement
• The nested IF statement = an IF statement within an IF
statement.
• When you use a nested IF statement the conditions must be
entered in the correct order. Begin with the largest, e.g.
= IF(B2>=80,”A”,IF(B2>=70,”B”,IF(B2>=60,”C”,”D”)))
• In a nested IF statement make sure that the number of left
and right-hand brackets agree. Check that every IF
function has a closing bracket at the end.
Summary of module
23

The VLOOKUP function


• Use a VLOOKUP function - too many IF functions to use in
a nested IF function.
• Be careful when you select the column – the number of the
column, (2 and 3) , not the name of the column.
• When the VLOOKUP function has to be copied to other cells
in a column, use absolute referencing for the lookup table,
e.g. =VLOOKUP(C2,$F$1:$G$5,2,FALSE)
• It is important that the values are sorted from low to high
when you use a VLOOKUP function with intervals. The
lowest must be at the top of the table.
Written module activity
24

CO
IUMIF UP
UN
TI
S O K

F
V L O
Practical module activity
25

Awards

FundRaising

Swimming

ReadingCompetition

CO
IUMIF UP
UN
TI
S O K

F
V L O

You might also like