Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

IT Learning Centre

The Hang Seng University of Hong Kong Workshop for IT Proficiency Test

05 Spreadsheet
MS Excel 2019
II. Excel Functions

IT Test: 1 Practical Qn.

1
IT Learning Centre
The Hang Seng University of Hong Kong

Accessing the Teaching Materials

IT Learning Center 2
IT Learning Centre
The Hang Seng University of Hong Kong

Contents
Spreadsheet II
◼ Formulas
◼ Built-in functions

IT Learning Center 3
IT Learning Centre
The Hang Seng University of Hong Kong

Sample spreadsheet using


formulas and build-in functions

IT Learning Center 4
IT Learning Centre
The Hang Seng University of Hong Kong

1. Formulas
◼ Using a formula can help you analyze data on a
worksheet more easily and efficiently.
◼ With a formula you can perform operations, such
as addition, multiplication, and comparison on
worksheet values.
◼ A Microsoft Excel formula always begins with an
equal sign =
◼ Without = at the beginning, Excel treats the
numeric or text value that you type directly into
a cell as a constant

IT Learning Center 5
IT Learning Centre
The Hang Seng University of Hong Kong

Operators
Operator Description Example
- Negation =-10
% Percent =A1%
^ Exponentiation =A1^2
* and / Multiplication =A1*A2/A1
and division
+ and - Addition and =A1+A2-A3
subtraction
& Text joining =“HELLO”&A1
= < > <= >= <> Comparison =IF(A1<>A2,1,0)

IT Learning Center 5
IT Learning Centre
The Hang Seng University of Hong Kong

References
◼ References are the addresses of cells,
i.e. A1 or B1 etc
◼ 2 major types (differ in the copy-and-
paste action):
◼ Relative reference
◼ Absolute reference

IT Learning Center 7
IT Learning Centre
The Hang Seng University of Hong Kong

Relative References
◼ When relative references are used, as you copy and
paste the cell, Excel will automatically update the
references relative to the position of pasted cell(s).

In this example, the formula at cell D3 is =B3-C3


As you copy the cell to D4, the formula is automatically updated as =B4-C4

IT Learning Center 8
IT Learning Centre
The Hang Seng University of Hong Kong

Absolute References
◼ When absolute references are used, the data in that
particular address will be used without change.
◼ An absolute reference is designated by adding a
dollar sign ($) before the column letter and the
row number.

$D$7
is kept
the
same

Hint: You may press F4 to switch between relative and absolute reference 9
IT Learning Centre
The Hang Seng University of Hong Kong

2. Excel Built-in Functions


◼ All Excel functions must include brackets

Function_name ( Parameter(s))
Examples
SUM(B2, B3, B4)
SUM(B2:B4)
Specifying a range

IT Learning Center 10
IT Learning Centre
The Hang Seng University of Hong Kong

Using Simple Built-in Functions


1. Always begin with =
2. When you start typing a function name, Excel will show you a list
of functions related to what you have typed
3. Double-click to select a suitable function

4. Highlight the required


range or cell(s),
5. Type close bracket
6. Press Enter
)

10
IT Learning Centre
The Hang Seng University of Hong Kong

Simple Built-in Functions by Category


a) Statistical functions
b) Mathematical functions
c) Logical function
d) Text functions

IT Learning Center 12
IT Learning Centre
The Hang Seng University of Hong Kong

a) Statistical Functions
⚫ AVERAGE() ⚫ COUNT()
⚫ MIN()
⚫ MAX()
⚫ SUM()

IT Learning Center 13
IT Learning Centre
The Hang Seng University of Hong Kong

AVERAGE(Range) / AVERAGE(Num1, Num2, …)


◼ Examples: AVERAGE(A1:B7) / AVERAGE(A1, A2, …)

MIN(Range) / MIN(Num1, Num2, …)


◼ Examples: MIN(A1:B7) / MIN(A1, A2, …)

MAX(Range) / MAX(Num1, Num2, …)


◼ Examples: MAX(A1:B7) / MAX(A1, A2, …)

SUM(Range) / SUM(Num1, Num2, …)


◼ Examples: SUM(A1:B7) / SUM(A1, A2, …)
IT Learning Center 14
IT Learning Centre
The Hang Seng University of Hong Kong

COUNT(Range)
◼ counts the number of numeric entries
in the given range
◼ Example: COUNT(A1:B7)

IT Learning Center 15
IT Learning Centre
The Hang Seng University of Hong Kong

b) Mathematical Functions
⚫ ABS()
⚫ SQRT()
⚫ ROUND()
⚫ TRUNC()

IT Learning Center 16
IT Learning Centre
The Hang Seng University of Hong Kong

ABS(Num)
◼ returns the absolute value of a given
number
◼ Examples: ABS(3) returns 3
ABS(-3) returns 3

SQRT(Num)
◼ returns the square root of a given
number
◼ Example: SQRT(16) returns 4
IT Learning Center 17
IT Learning Centre
The Hang Seng University of Hong Kong

ROUND(Num1, Num2)
Number of decimal places

◼ rounds a number to the specified nearest


decimal place(s)
◼ Examples:
ROUND(10.475, 2) gives 10.48
ROUND(10.824, 0) gives 11
(Notice: if the cell is formatted to show one d.p., then it will show
11.0)

IT Learning Center 18
IT Learning Centre
The Hang Seng University of Hong Kong

TRUNC(Num1, Num2)
Number of decimal places
◼ truncates a number to the specified
decimal place(s)
◼ Example: TRUNC(-8.956, 2) gives -8.95

◼ If Num2 is zero or not specified,


i.e. TRUNC(Num1, 0) or TRUNC(Num1)
 removes the fractional part of the number
◼ Example: TRUNC(8.956) gives 8

IT Learning Center 19
IT Learning Centre
The Hang Seng University of Hong Kong

c) Logical Function - IF()


◼ returns one value if logical test is true,
another value if logical test is false
◼ Syntax:
IF(logical_test, value_if_true, value_if_false)
◼ Example: G2=IF(F2>50, “PASS”, “FAIL”)

Copy this formula


to other cells

20
IT Learning Centre
The Hang Seng University of Hong Kong

d) Text Functions
⚫ MID() ⚫ LEN()
⚫ UPPER() ⚫ CONCATENATE()
⚫ LOWER()
⚫ PROPER()
⚫ TRIM()

IT Learning Center 21
IT Learning Centre
The Hang Seng University of Hong Kong

MID(text, start_pos, Num)


Starting position number of char. to copy
◼ copies character(s) from a string,
starting at the position specified
◼ Example: MID(“School”, 3 , 2) returns “ho”

TRIM(text)
◼ removes all spaces from text except for
single space between words
◼ Example:
Trim(“ First Quarter ”) returns “First Quarter”
spaces 22
IT Learning Centre
The Hang Seng University of Hong Kong

UPPER(text)
◼ converts all letters in a text string to
uppercase
◼ Example: UPPER(“School”) returns “SCHOOL”

LOWER(text)
◼ converts all letters in a text string to
lowercase
◼ Example: LOWER(“School”) returns “school”

IT Learning Center 23
IT Learning Centre
The Hang Seng University of Hong Kong

LEN(text)
◼ returns the length of a string
◼ Examples
LEN(“Excel”) returns 5
LEN(“MS Excel”) returns 8

IT Learning Center 24
IT Learning Centre
The Hang Seng University of Hong Kong

CONCATENATE(text1, text2, …)
◼ joins several text strings into one
string
◼Example
CONCATENATE(“EXCEL ”, “is easy”) returns
“EXCEL is easy”

*May use & for the joining instead


◼ Example
“EXCEL ”&“is easy” returns “EXCEL is easy”
IT Learning Center 25
IT Learning Centre
The Hang Seng University of Hong Kong

PROPER(text)
◼ capitalizes the first letter in text and any
other letters in text that follow any character
other than a letter. Converts all other letters to
lowercase.
◼ Examples
PROPER(“this is a TITLE”) returns “This Is A Title”
PROPER(“76BudGet”) returns “76Budget”

IT Learning Center 26
IT Learning Centre
The Hang Seng University of Hong Kong

Recommendation
◼ To join Intermediate/Advanced Level of
IT Workshops to learn more skills

IT Learning Center 27

You might also like