Professional Documents
Culture Documents
Topic 6 Genral and Logical Functions
Topic 6 Genral and Logical Functions
Lecture Overview
Lecture 6
3 4
5 6
1
6/22/2021
11 12
2
6/22/2021
13 14
Rounding Functions
1. ROUND( ) Function 2. ROUNDDOWN( ) Function
• Rounds off a numeric value to a specified • Rounds numbers down towards zero.
number of decimal places. • Example:
• Format: =ROUNDDOWN(1.9, 0) 1
= ROUND(number,d.p.)
• Example
=ROUND(3.987, 2) 3.99
15 16
Summation Functions
1. SUM( ) Function
3. ROUNDUP( ) Function
• Sums up values in a given range.
• Rounds numbers up away from zero. • Format:
• Example: =SUM(range)
=ROUNDUP(1.1, 0) 2 • Example:
=SUM(C1:C5)
N/B: The function ignores text data and
blank cells.
17 18
3
6/22/2021
3. SUMIFS() Function
• Sums up values in a range that meet 2 or more
conditions.
• Format:
=SUMIFS(sumRange,conditionRange1,cond
ition1, conditionRange2,condition2,…….)
• sumRange – range whose values are to
be summed up
23 24
4
6/22/2021
Logical Functions
Boolean Expression
• a function that can make a decision • An expression that evaluates to either value
between two alternatives depending TRUE or FALSE.
on the outcome of a given condition. • It is constructed using comparison operators:
1. > 4>5
• The condition is expressed as a
2. < 2<3
Boolean expression.
3. = 2=1
4. <> (not equal to) 2<>1
27 28
5
6/22/2021
• Sol
=IF(G4>=100,”Pass”,”Fail”)
• N/B: Text data must be enclosed in “”
(double quotes).
31 32
6
6/22/2021
• Notes:
1. Given N alternatives, it requires nesting (N-
1) IF() functions to implement.
2. Excel allows nesting of up to a maximum of
8 IF() functions.
39 40
Text Functions
1. CONCATENATE( ) function 2. LEN( ) Function
• joins 2 or more text strings together . • counts the number of characters in a
• Example: string of text including blank spaces.
=CONCATENATE(“John”,”Paul”) • example:
JohnPaul A1=Hello
=LEN(A1) 5
41 42