Anda di halaman 1dari 15

Faculty of Information Science & Technology

(FIST)

PCA 0150
Computer Applications

Foundation in Information Technology,


Life Sciences and Law

ONLINE NOTES

Tutorial 4

MS Excel
PCA0150 Computer Applications

Objectives:

Upon completion of this topic, the students should be able to:


 Identify parts of the MS Excel application
 Create, delete, rename worksheets
 Create series of formulas by dragging the fill handle
 Work with simple formulas
 Create graphs of data

 A worksheet includes cells, gridlines, column and row


headings, sheet tabs and scrolling bars.
 Excel rows are identified by numbers, and columns by letters.
 Each cell is identified by a combination of the row and column
labels, e.g. B5.
 Formula Bar -displays the content (can be a value or formula)
of the active cell.
 Split box - use to split a worksheet to view 2 parts of the
worksheet simultaneously.
o To activate it drag the splitbox onto the worksheet or
click View tab/ribbon | Window group | Split
o To remove: double click on the divider or click View
tab/ribbon | Window group | Split once again.
 To modify the content of any cell, click on it and press F2 or
click the Formula Bar. Press Esc to cancel the cell entry.
 Some useful buttons: AutoSum, Paste Function, Sort Ascending, Sort
Descending, Chart Wizard, Merge and Center, Currency Style, Percentage
Style, Comma Style, Decrease Decimal, Increase Decimal.
 Fill Handle - the black square in the lower
right corner of the active cell or selection.
When the cursor point is on the fill handle,
it will change its shape from a plus sign to
a crosshair. Drag it downward or to the

FIST 2/15 Last updated: 03/05/2014


PCA0150 Computer Applications

right and release your mouse. What's the


difference between dragging the fill handle
using left mouse click and right mouse
click?

1. Formatting cells

 To format a cell or any selections press Ctrl+1 or click Home


tab/ribbon | Cells group | Format or right-click the selection
and choose Format Cells…
 Sometimes the data is automatically formatted for you like
with dates.

 The overflow marker appears when the cell contains a


####
number, date, or time that is wider than the cell. Make the
cell's column wider to fix it.

2. Series

 Method 1: Type the first 2 numbers of the series as shown


above. Highlight both numbers. Drag the fill handle to the
right and release. If you drag to the left, the series will be
decreasing.
 Method 2: Type the first number of the series. Select it. Then
click Home tab/ribbon | Editing group | Fill | Series.
 Method 3: Type the first number and drag the Fill Handle
using the right mouse button, release the mouse and then
you can choose from:
 Copy Cells: copy everything
 Fill Series: produce a series of numbers incremented
by 1
 Fill Format: copy the colour and text styles
 Series: produce a series where you can specify the rate
of increment.

3. Equations & Functions (solve this part by doing it on the


computer itself!)

FIST 3/15 Last updated: 03/05/2014


PCA0150 Computer Applications

Question 1: Start in a new sheet and rename the sheet to


account. Build the table, the revenue and expenses for the months
of January to April are shown in Diagram 2. Use the steps given in
Diagram 2 and the instructions given below to complete the
calculation given that:

Profit = Revenue - Expenses and 5% tax is charged on the


Profit

 Use formulas to solve this question. You can type the formula
directly into the cell as shown above or click the Insert
Function button (labeled fx).
 To calculate the Profit for Feb, Mar and April select B5 and
drag the Fill Handle to the right. Apply the same method
when you calculate Tax.
 To calculate the total, type in the formula in cell F3. Select F3
and drag the Fill Handle downwards. Apply the same method
when you calculate Average, Highest and Lowest.
 Other methods to calculate the total:
 Click the cell F3 and click the AutoSum button
 Or type the formula =b3+c3+d3+e3
 To calculate average in G3 you can also use = F3 / 4
 To calculate the tax in B6 you can also use = 5/100*B5 or
=5%*B5

Question 2: In a new sheet in the same file draw the following


table using the exact colour and border styles. Rename the sheet to
bowling. Your task is to determine whether the player qualifies to
the 2nd round or not in Column F and fill in the prize for the player
in column G. Read the solution under the diagram before you
proceed.

FIST 4/15 Last updated: 03/05/2014


PCA0150 Computer Applications

Diagram 3 - Bowling
 Start by colouring the background with light brown by clicking
on the Select All Button and click Fill Color.
 Highlight C3:H14 fill it with gray. Merge C2:H2 and fill it with
black.
 HINT: Use Alt + Enter to insert a new line within the same
cell (for the title of the table)
 Merge B4:B8 and merge B9:B13 then Ctrl+1. Click
Alignment to change the text orientation.
 To colour alternately blue-green-blue: colour Albakri's entry
(d4 to g4) with blue and Alban's entry (d5 to g5) with green.
Then highlight both lines (d4 to g5), drag the Fill Handle using
right mouse click till Sharon's entry (G14). Release the
mouse and click Fill Formatting Only. Do the rest on your
own. 

Question 2a: Put the word No in the cell F4 if the Points are less
than 125, otherwise display Yes.
 Click on cell F4 and click the Insert Function Button or
Formulas tab/ribbon | Function Library group | Insert
Function. Set Category = All, Function name = IF. Click OK
and set the test as shown below. We want to test the Points
of the first player (which is in E4) to see whether it is <125 or
not.

 Click Ok and Excel will perform the test. Use a right click and
drag the Fill Handle from E4 to E13. Release the mouse and
choose Fill Without Formatting. If you use left button to
drag it will copy the colour as well as the formula, which we
don't want to happen.

FIST 5/15 Last updated: 03/05/2014


PCA0150 Computer Applications

 If you are an expert you can type the formula directly into cell
F4 =if(e4<125,"no","yes") or =if(e4>124, "yes",
"no")

Stupid question: why do we want to use a formula when you can


type the value yes and no manually? Answer: what if you have 100
bowlers. Do you still want to type manually? And let’s say you want
to change the qualifying level to 100 points, you can easily modify
the first formula and drag the Fill Handle again.

Question 2b: Put the prize in column G: keychain, mug or t-shirt

 The function IF works this way: IF (logical_test,


value_if_true, value_if_false ) . But we can combine
several tests by using a nested if to solve this problem:
 Click the cell G4 and type =if(e4>=150,"T-
shirt",if(e4>100,"Mug","Keychain"))
 Or you can start the test from lowest value
=if(e4<=100,"Keychain",if(e4<150,"Mug","T-
shirt"))

Question 2c: Count how many male and female contestants


qualified for the 2nd round and count how many will receive a mug,
a t-shirt or a keychain.
 To count the males: click on cell L5 and type
=countif(F4:F8,"yes")
 An easier way is click Insert Function and choose COUNTIF.
Type in the range F4:F8 or highlight F4 till F8 using your
mouse and type in the criteria: yes and then Press Enter.
 Count the females using the same method.

Question 2d: Sort the males' list according to the points from
highest to lowest, and sort the females by their names A to Z
 Highlight d4 to g8 > click Data tab/ribbon > Sort & Filter
group > click Sort > Uncheck option My Data Has headers >
sort by: column E, sort on: Value, order: Largest to Smallest.
 Highlight d9 to g13 > Data tab/ribbon > Sort & Filter group
> click Sort > Uncheck option My Data Has headers > sort
by: column D, sort on: Value, order: A-Z.

3. Referencing Cells

 Range Reference- refer to a range of cells e.g. B6:D7


 Relative Reference - When you create a formula, references
to cells or ranges are usually based on their position relative
to the cell that contains the formula. For example in Diagram
2, to calculate the profit we used B5=b3-b4 which means

FIST 6/15 Last updated: 03/05/2014


PCA0150 Computer Applications

Excel will deduct the cell which is 2 rows above b5 with the
cell 1 position above b5. That's why when you drag the fill
handle to the right the formula changes to c5=c3-c4 and
d5=d3-d5.
 When you drag the fill handle sideways the letters (alphabets)
will be adjusted but if you drag it up and down, the numbers
in the formula will be adjusted. Is there any way that we can
fix the row number and column letter?
 Yes! Absolute References - when you want to copy a
formula without having all its references adjusted.
 put a dollar sign before the letter if you want to fix the column
e.g. $A1 , put a dollar sign before the number if you want to
fix the row e.g. A$1 or you can fix both by using $A$1 .

Question 3.1 Try this out in a new sheet in the same file. Name
the sheet as referencing.

 The easiest way to type the equation is:


 First click on the cell C1 and type the equal sign =
 Then click on the cell A1
 Next type in + on the cell C1
 Click on the cell B1 and press enter
 Drag down from cell C1 until C3
 Next click on cell D1 and type the equal sign =
 Then click on the cell A1
 Next type in + on the cell D1
 Then click on cell B1, press the F4 key several
times. Each time you press F4, Excel toggles through
the combinations: absolute column and absolute row
(for example, $C$1); relative column and absolute row
(C$1); absolute column and relative row ($C1); and
relative column and relative row (C1)
 Complete the following table based on the data on
the table above. The first 3 are done for you. To know
the equation you must activate the formula bar - click
view then tick formula bar.
 Put the table below the one you just created
 In order to type the equation as requested without it
being executed, start the cell with an apostrophe (‘)

FIST 7/15 Last updated: 03/05/2014


PCA0150 Computer Applications

symbol before the = of the formula. This tells Excel not


to execute anything that follows.

Question 3.2 As an example of how useful the absolute


reference is: Back to the Bowling diagram in Question 2, let's say
that the organizer will only take around 20 bowlers from 100
contestants for the 2nd round. They need to adjust the
qualification points so that the total is around that figure. To
solve this problem make the following amendments to your
table:

 Another example: Click on M11 (the cell to count how many


bowlers scores 150 and above). Type in the formula
=COUNTIF(G$4:G$13,"T-shirt") then drag the Fill Handle
from M11 downwards to M12 and M13
 M12 and M13 will become =COUNTIF(G$4:G$13,"T-shirt")
because of the absolute reference applied on the row
numbers. All you need to do is replace the word T-shirt with
Mug in M12 and Keychain in M13.
 Still finicky isn't it? Wait till you see this trick Name
Referencing:

 Say goodbye to absolute referencing because we can also give


a name to a range of cells! Highlight G4 till G13. Click the

FIST 8/15 Last updated: 03/05/2014


PCA0150 Computer Applications

name box and type a simple name like prize. Then modify
the formula in M11 to =COUNTIF(prize,"T-shirt") Then you
should know what to do ? .... Drag the fill handle from M11 to
M13!

4. Inserting, Deleting, Resizing, Printing


 To insert row cells, rows and columns
 Place the cursor in the row below where you want the
new row, or in the column to the left of where you want
the new column
 Click the Insert button on the Cells group of the Home
tab/ribbon
 Click the appropriate choice: Cell, Row, or Column

 To delete cells, rows and columns


 Place the cursor in the cell, row, or column that you
want to delete
 Click the Delete button on the Cells group of the
Home tab
 Click the appropriate choice: Cell, Row, or Column

 Deleting removes the selected area from the worksheet, and


then fills in the gap with the contents of adjacent cells,
columns, or rows. Whereas Clearing erases the content of
the selected area without removing the selection from the
worksheet.
 To change the width of a column, use any of the following
methods:
 Point to the border line of the column heading, and drag
the border to the left or right

FIST 9/15 Last updated: 03/05/2014


PCA0150 Computer Applications

 Select any cell in the desired column and click the


Format button on the Cells group of the Home
tab/ribbon

 To print a range:
 Select the area to be printed
 Click the Print Area button on the Page Layout tab
 Click Select Print Area

 If you don’t want to print a particular column, right click


on the column header and click Hide

5. Graphing

Before we work with Charts, there are a couple of essential steps


we have to do. First, we have to tell Excel 2007 what we want to
see in our chart and then were we want the chart to go.

Question 5.1

FIST 10/15 Last updated: 03/05/2014


PCA0150 Computer Applications

Plot the Expenses against Month for the data in Diagram 2. Use
the same worksheet (Accounts).

 Step 1: Select the row that contains the names of the months
from A2 till E2
 Step 2: Hold down Ctrl key on the keyboard and select the
row that contains the Expenses from A4 till E4
 Step 3: Click the Insert Tab at the top of the Excel screen.
When you do you’ll see that one of the Groups in the Insert
Tab/Ribbon is Charts

 Step 4: For our first chart, we’ll use a Column Chart. Move
your cursor over Column and an image like the one on the
right will appear.

 Step 5: Click the Column button


Chooseand then Click
Clustered on the 2-D
Column
Column chart indicated by the arrow
on theon theColumn
2-D left.

FIST 11/15 Last updated: 03/05/2014


PCA0150 Computer Applications

 Step 6: Click inside your chart and you can see Chart Tools at
the top of the Excel screen. We will used Chart Tools to
modify our chart.

Chart before edit

 Step 7: Next we want to modify our charts. Play around with


properties of each element of the graph: adjust your graph so
it looks like the graph shown above.

FIST 12/15 Last updated: 03/05/2014


PCA0150 Computer Applications

Chart Tools

The Chart Tools appear on the Ribbon when you click on the chart.
The tools are located on three tabs: Design, Layout, and Format.

Within the Design tab you can control the chart type, layout,
styles, and location.

Within the Layout tab you can control inserting pictures, shapes
and text boxes, labels, axes, background, and analysis.

Within the Format tab you can modify shape styles, word styles
and size of the chart.

FIST 13/15 Last updated: 03/05/2014


PCA0150 Computer Applications

Question 5.2

In the same file but in a new worksheet named waves : complete


the following table and build a graph as shown on the right side
using the XY scatter graph.

Question 5.3

On a new worksheet named Answers, in the same file, answer the


following questions.
a. Give 2 methods how can you move a selection of cells A1 till C3
to a new location so A1 is in H1.

b. Give 2 methods how to remove the fill colour of the cells without
deleting the data.

c. In diagram 2: copy A1 till I6 > click on A8 > Edit > Paste Special
> Tick Transpose > OK. Describe what happens.

d. In question 2b what's wrong if I type the formula


=if(e4<=100,"Keychain",if(e4>100,"Mug","T-shirt"))

e. Let's say the organizer of the bowling tournament wants to


change the prize whereby 180 and above gets a palmtop, 150 to
179 a handphone, 100 to 149 a t-shirt and below 100 a brickgame.
Give a valid formula in G1:

Question 5.4

FIST 14/15 Last updated: 03/05/2014


PCA0150 Computer Applications

On a new worksheet named Gantt, in the same file, produce a


Gantt Chart like this.
Hint: the graph that looks similar to Gantt Chart is the Stock
Graph. But the problem with stock graph is you must provide it
with 3 sets of variables. In this case you only have 2 variables –
which are the start and end date. Just duplicate either the start or
end date so that you have 3 sets of variables.
i. How to set the max date to 8th of Feb and min to 1st of Feb
ii. How to make the blue lines thicker?
iii. Give 2 methods to print the graph so it fits nicely on an A4
paper.

FIST 15/15 Last updated: 03/05/2014

Anda mungkin juga menyukai