Professional Documents
Culture Documents
Introduction
Microsoft Excel is one of the most popular spreadsheet tools. Spreadsheet is in tabular
format for organizing, analyzing and storing data. It can also be used for plotting various
type of charts and acting as basic database.
Cells
Workbook Worksheet
Range (Particular
(Student (Student
(Students' information of
Information ) Personal
Characteristics) a partciular
Contact)
students)
Open a Workbook
➔ File →Open → Recent (Recently used workbook)/Browse (Other locations)
Basic Control
Workbook name
Tabs/Ribbons
Quick Access
Worksheet
Views options (Normal view, Page layout, Page break)
Zoom
Column: From A to XFD (16,384 columns). Usually for storing the variables or fields.
Row: From 1 to 1,048,576. Usually for storing records.
Cell: Individual cells in the spread sheet which is the intersection of row and column.
Range: A group of cells for easy reference in the spreadsheet.
checking)
Entering Data
Editing
Moving the Cell pointer to the desired location, type the data then press enter.
- F2 can be pressed to switch between “edit” and “enter” mode when you want to
replace or change the content of the cells, this is particularly important for entering
formula. (Edit: Typing, Enter: move between cells)
Autofill
Auto Fill can help you to fill the cells with repeated contents, series of values or even
copy the format only.
Auto Fill Handle Auto Fill Option
Auto fill will repeat the content when you drag the auto fill handle unless specific
pattern can be identified or some of the cells are filled with predefined data (for example,
date, time, weekdays…)
What will happen if you drag the fill handle to row 8????
Icon Function
Cut
Copy (Can be copy as picture)
Basic Display
Adding Column and Row
- Right click and select Insert
- Home Ribbon → Cell Group → Insert
- Selected column and row will shift to the right and move down
-
Deleting Column and Row
- Right click and select Delete
- Home Ribbon → Cell Group → Delete
- Selected column and row will shift to the left and move up
2. Alignment*****
- Text alignment: e.g. you want to put the text in the middle of the cells (both
horizontally and vertically.
Extra: If you want to adjust the row height and the column width that fit the longest
text of various rows/column, move your cursor above or below the rows (OR to the
right or left of the column). Double click when you see a two-sided arrow appears!!!!
3. Font: Changing the color, styles, effects… of the text.
4. Border: Adding lines around the cells for highlighting and clear display
5. Fill: Changing the colors or patterns of the cells (not the cells)
Exercise 1
Create the following worksheet with appropriate display and formatting techniques.
(Remember to save your file for the next exercise!!! Name your sheet as Dec 2018)
Write down the techniques that you have used in the above exercises:
Merge and Center
Border
Fill
Bold
Italic
Underline
Accounting Number
Increase decimal
Sorting
For better presentation, it may be better to have some patterns for arranging the
expenses. For example, in alphabetical orders.
If there are few sorting criteria, simply click the sort button above and specific the
sorting order.
Freeze
Consider the following cases, when you zoom the worksheet to this scale or when you
have a worksheet with some many columns that cannot be displayed in a single view.
How can you read the most important labelling column? (For example, what does the
blue cells refer to?)
Formula
The formula can be entered by yourself or by built in functions.
Excel defines the input as formula rather than text if the cell content starts with an
equal sign =
Method 1: Simply click the fx icon next to the box for formula editing
The insert function box will appear and you can select the function you need
This method would guide you by listing all the elements you need to complete this
function with description of the function.
After you select the specific function, you will go to the same insert function box as
Method 1. This method may be easier than method 1 as the functions are listed in
categories.
Symbols/functions Usage
“ “ e.g. =if(A1=“text”,1,0) Text input
: e.g. =sum(A1:A3) Continuous Range
, e.g. = sum(A1, A3:A5) Multiple cells/ranges
Ctrl + ¬ Display the formula
F4 Change the reference mode (absolute, relative, mixed)
Consider the following two case. (You can ignore the mixed reference and absolute
reference first)
Case 1:
If you have 2 dices (1 yellow and 1 blue), and you would like to find out the sum of
these two dices when both are thrown once. Write down what should be entered exactly
in cell B2, B4, D5 and F5 in the following excel worksheet.
Case 2:
The commission rate is specified in C1, write down the formula you will use in Cell
C4 to C6.
Built-In Function
1. Math & Trig
E.g.
Write down what should be entered exactly in B8 to calculate total sales of the
company.
=SUM(B4:B7)
What will be the result?45000
Function: SUMIF Usage: Returning the total of a series of cells when the specified
criterion(a) is/are matched
Syntax: =SUMIF( range, criteria, [sum_range] )
Return: Number
E.g.
Write down what should be entered exactly in B10 if we want sum the sales record
that is larger than or equals to 14000.
=SUMIF(B4:B6,">=14000")
What will be the result? 32000
Function: Usage: Returning the total of the products of the specified range
SUMPRODUCT
Syntax: =SUMPRODUCT( array1, [array2], [array3], ... )
Return: Number
E.g.
Write down what should be entered exactly in C8 to calculate the total sales by using
the price per product and quantity columns instead of the sales column directly.
=SUMPRODUCT(D4:D6,E4:E6)
What will be the result? 45000
E.g.
Write down what should be entered exactly in C4 to calculate the total commission
which can be auto-filled to C5 and C6. Round your answer to 1 decimal place.
=Round(B4*$C$1,1)
What will be the result? 819.1
2. Text
Function: Usage: Joining two or more strings together
CONCATENATE
Syntax: =CONCATENATE(text1, [text2], ...)
Return: Text
E.g.
Write down what should be entered exactly in C12 for putting the word “Total Sales
Commission”.
Function: LEFT Usage: Returning specific number of characters from the left of
the text
Syntax: = LEFT( text, [num_chars] )
Return: Text
E.g.
Write down what should be entered exactly in a cell for returning the first 3 characters
of the name of the sales
=LEFT(A4, 3)
What will be the result? Amy: Amy Peter:Pet Zoe: Zoe
Function: RIGHT Usage: Returning specific number of characters from the right
of the text
Syntax: = RIGHT( text, [num_chars] )
Return: Text
E.g.
Write down what should be entered exactly in a cell for returning the last 2 characters
of the name of the sales
=RIGHT(A4, 2)
E.g.
Write down what should be entered exactly in a cell for returning the 4 characters
starting from the 2nd characters of the name of the sales
=MID(A4, 2, 4)
E.g.
Write down what should be entered exactly in a cell to count the length of the name
for each sales.
=LEN(A4)
E.g.
Write down what should be entered exactly in a cell to search for position of the 2nd
“e” for the Peter
=SEARCH(“e”,A5,3)
Challenge yourself!!!!
Combine what you have learnt in the text function section and write down what should
be entered exactly (built in function only)in order to return the surname of Amy in Cell
F4 that can auto-fill to F5 and F6.
=RIGHT(A4,LEN(A4)-SEARCH(" ",A4,1))
3. Logical
Function: AND Usage: Checking the condition specified in the logical test
Syntax: =AND( logical_test1, [logical_test2], ... )
Return: TRUE/FALSE
E.g.
Write down what should be entered exactly in a cell to test whether the commission
are larger than 300 and smaller than 700.
=AND(C4>300,C4<700)
E.g.
Write down what should be entered exactly in a cell to test whether the commission
are larger than 700 or smaller than 800.
=OR(C4>700,C4<800)
What will be the result for each sales person? Amy:True Peter:True Zoe:True
Function: IF Usage: Checking the condition specified in the logical test and
return different results if the condition is true or false
Syntax: = IF( logical_test, value_if_true, value_if_false )
Return: Output designed by the users
E.g.
Write down what should be entered exactly in cell G4 to test whether the commission
is larger than 500. If Yes, return excellent and poor otherwise. The result can be auto-
filled to G5 and G6.
=IF(G4>500, “excellent”, “poor”)
What will be the result for each sales person?
Amy: excellent Peter: excellent Zoe: excellent
Exercise 2
i) Write down what should be entered exactly in cell B4 to display the last name of
the student. The result can be auto-filled to B5 and B10.
=LEFT(A4,SEARCH(" ",A4)-1)
ii) If the participation mark is calculated by using the attendance to multiply by the
effort. Write down what should be entered exactly in cell I4 to find the
participation mark for Chan Siu Man. The result can be auto-filled to I5 and I10.
=L4*M4
iii) The teacher would like to find out the total participation of all the students. Write
down what should be entered exactly in cell I12 to find the total participation mark.
=SUMPRODUCT(L4:L10,M4:M10)/=SUM(I4:I10)
iv) E2 to I2 are the weighting for different assessment components. Write down what
should be entered exactly in cell J4 to calculate the overall mark of the student.
The result can be auto-filled to J5 to J10.
=SUMPRODUCT($E$2:$I$2,E4:I4)
v) If the student obtain lower marks in mid-term than group project and performs
poorly in in-class assignment than individual assignment, he or she will be named
as “Pressure” student. Write down what should be entered exactly in Cell K4 so
that a Yes will be displayed in column K if he or she meets the above condition
and No otherwise. The result can be auto-filled to K5 to K10.
=IF(AND(H4<E4,G4<F4),"Yes","No")
vi) B14 displays the total effort paid by the students who are majoring in IT. Write
down what should be entered exactly in the cell.
=SUMIF(D4:D10,"IT",M4:M10)
E.g.
Write down what should be entered exactly in H4 so as to find out which team Amy
belongs to. The result can be auto-filled to H5 to H6.
=VLOOKUP(LEFT(A4,1),$A$15:$B$17,2)
What will be the result for each sales person? Amy:1 Peter:2 Zoe: 3
Write down what should be entered exactly in I4 so as to find out how much award
amount Amy will get. The result can be auto-filled to I5 to I6 if all team will receive
sliver award this year.
=HLOOKUP(H4,$E$14:$G$17,3)
What will be the result for each sales person? Amy:900 Peter:1100 Zoe: 800
Challenge yourself!!!!
If students are to be assigned into difference batch for random result checking. The
assignment is as follow.
The sum of the 3rd and 4th digit of the Student ID Batch Number
0-2 1
3-5 2
6-8 3
9-11 4
12-14 5
15-18 6
ii) Write down what should be entered exactly in N4. The result can be auto-filled to
N5 to N10
=VLOOKUP(MID(C4,3,1)+MID(C4,4,1),$O$3:$P$9,2)