Lecture 04
Lecture 04
TARKWA, GHANA
FACULTY OF ENGINEERING
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
MN 159
Course Instructor
DR FELIX L. ARYEH
PhD (UMaT), MSc (KNUST), BSc (UG), MIEEE, MIAENG, MGARNET
MS Excel
Lecture 4
2
Objectives and Expected Outputs
❑The objectives of this lecture are to:
❑Introduce MS Excel 2010 as a spreadsheet software;
❑Get familiarize with ribbons and how to customize MS Excel 2010;
❑format a table in MS Excel 2010;
❑Deal with formulae; and
❑Plot and format charts.
❑At the end of the lecture, it is expected that the student will be able
to:
❑Understand spreadsheet and spreadsheet ribbons and terminologies;
and
❑Use MS Excel to create, edit, format and print tables and charts.
❑Manoeuvre around MS Excel 2010 confidently
3
Ms Excel
▪ A component of the Microsoft Office Suite, Excel is a
spreadsheet program that is be used to create and format
workbooks (a collection of spreadsheets) in order to analyze
data and make more informed business decisions.
▪ Excel can be used to track data, build models for analyzing
data, write formulas to perform calculations on that data,
and present data in a variety of professional looking charts.
▪ Each Excel file is a workbook that can hold many
worksheets.
▪ The worksheet is a grid of columns (designated by letters)
and rows (designated by numbers).
▪ The intersection of a column and a row is called a cell. Each
cell on the spreadsheet has a cell address that is the column
letter and the row number. 4
Ms Excel Terminology
Term Definition
A life of spreadsheets/worksheets. A workbook can contain a number of
spreadsheets/worksheets. Think of an accounts ledger with one page for each week’s
Workbook transactions.
A table used to store numbers and text. Spreadsheet is used to describe one table or
Spreadsheet or
worksheet
Worksheet
Click into the cell and this makes it the current cell, the one you are entering data into.
Active Cell
Used in calculation to find the: Average, Maximum, Minimum, and Sum of an amount.
Function
Spreadsheets are divided into vertical columns each has a letter at the top (e.g. A)
Column
Spreadsheets are also divided into rows horizontally and each has a number on the left
Row of the screen
Each cell has a reference taken from the point that the column and row meet (e.g. A1,
Cell Reference where column A and row 1 meet). 5
Ms Excel Layout
6
TOOLBARS
2 toolbars in MS Excel
Quick Access Toolbar - By default, only three buttons are
on the quick access toolbar but these can be edited and
other regularly used buttons can be placed there. The
toolbar can be customised by adding most often used
commands.
TABS
Home
Insert
Page Layout
Formulae
Data
Review 8
WORKBOOKS AND WORKSHEETS
Each Excel file is a Workbook containing one or more
Worksheets. By default excel provides you with three
worksheets – you can add or remove as needed from there.
Worksheets can also be reordered within the file and
renamed – you can also copy or move a worksheet to
another workbook (file).
Creating Workbooks - Click the File tab and then click New.
Under Available Templates, double click Blank Workbook or
Click Create.
10
WORKBOOKS AND WORKSHEETS
11
WORKBOOKS AND WORKSHEETS
Freezing/Splitting Rows and Columns - When you freeze panes, Microsoft Excel
keeps specific rows or columns visible when you scroll in the worksheet. For
example, if the first row in your spreadsheet contains labels, you might freeze
that row to make sure that the column labels remain visible as you scroll down in
your spreadsheet.
Freeze Panes - On the worksheet, select the row or column that you want to
keep visible when you scroll.
On the View tab, in the Window group, click the arrow below Freeze Panes.
Then do one of the following:
To lock one row only, click Freeze Top Row.
To lock one column only, click Freeze First Column.
To lock more than one row or column, or to lock both rows and columns at the
same time, click Freeze Panes.
Unfreeze panes - On the View tab, in the Window group, click the arrow below
12
Freeze Panes. Click Unfreeze Panes.
WORKBOOKS AND WORKSHEETS
To set Column/Row Width/Height,
Select the column(s) or row(s) that you want to change.
On the Home tab, in the Cells group, click Format.
Under Cell Size, click Column Width or Row Height
A Column Width or Row Height box will appear.
In the Column Width or Row Height box, type the value
that you want your column or row to be.
13
WORKBOOKS AND WORKSHEETS
Merge and Unmerge Cells
Select two or more adjacent cells that you want to merge.
On the Home tab, in the Alignment group, click Merge and
Center.
The cells will be merged in a row or column, and the cell
contents will be centered in the merged cell.
▪ Select the cell that contains the formula that you want to be brought to other
cells.
▪ Move your curser to the small black square in the lower-right corner of a
selected cell also known as the fill handle. Your pointer will change to a small
black cross.
▪ Click and hold your mouse then drag the fill handle across the cells,
horizontally to the right or vertically down, that you want to fill.
▪ The cells you want filled will have a gray looking border around them. Once
you fill all of the cells let go of your mouse and your cells will be populated.
16
WORKBOOKS AND WORKSHEETS
Formatting Spreadsheet - To further enhance your spreadsheet you can format a
number of elements such as text, numbers, colouring, and table styles. Spreadsheets
can become professional documents used for company meetings or can even be
published.
Wrap Text - You can display multiple lines of text inside a cell by wrapping the text.
Wrapping text in a cell does not affect other cells.
▪ Click the cell in which you want to wrap the text.
▪ On the Home tab, in the Alignment group, click Wrap Text.
▪ The text in your cell will be wrapped.
Cell Borders - By using predefined border styles, you can quickly add a border around
cells or ranges of cells. If predefined cell borders do not meet your needs, you can
create a custom border.
NB: Cell borders that you apply appear on printed pages. If you do not use cell
borders but want worksheet gridline borders for all cells to be visible on printed pages,
17
you can display the gridlines.
WORKBOOKS AND WORKSHEETS
Format Numbers - In Excel, the format of a cell is separate from the data that is
stored in the cell. This display difference can have a significant effect when the
data is numeric. For example, numbers in cells will default as rounded numbers,
date and time may not appear as anticipated. After you type numbers in a cell,
you can change the format in which they are displayed to ensure the numbers in
your spreadsheet are displayed as you intended.
18
FORMULAS IN EXCEL
Formulas are equations that perform calculations on values in your worksheet. A
formula always starts with an equal sign (=). An example of a simple formula is
=5+2*3 that multiplies two numbers and then adds a number to the result.
Microsoft Office Excel follows the standard order of mathematical operations. In the
preceding example, the multiplication operation (2*3) is performed first, and then 5
is added to its result.
You can also create a formula by using a function which is a prewritten formula that
takes a value, performs an operation and returns a value.
For example, the formulas =SUM(A1:A2) and SUM(A1,A2) both use the SUM
function to add the values in cells A1 and A2. Depending on the type of formula
that you create, a formula can contain any or all of the following parts.
Cell references: You can refer to data in worksheet cells by including cell references
in the formula. For example, the cell reference A2 returns the value of that cell or
uses that value in the calculation.
19
FORMULAS IN EXCEL
Create a Formula with Cell References
The first cell reference is B3, the colour is blue, and the cell range has a blue
border with square corners. The second cell reference is C3, the colour is green,
and the cell range has a green border with square corners. To create your
formula:
21
FORMULAS IN EXCEL
Formula What Does It Do
=sum(B3:B9) To add a row/column
=B3+B4 To add 2 cells
=B1*B2 To multiply 2 cells
=B1-B2 To subtract one cell from another
=B1/B2 To divide one cell by another
=Count(B3:B9) To find the number of entries (counts only cells which contain data)
=IF(B3<10,”Inform Help you to flag up when action needs to be taken by displaying a message.
Manager”,”OK”) i.e. if a value is less than 10 inform the manager, if it is more than 10 it is OK
22
FORMULAS IN EXCEL
Arithmetic Formulas - Formulas are entered in the worksheet cell
and must begin with an equal sign "=". The formula then includes
the addresses of the cells whose values will be manipulated with
appropriate operands placed in between. Excel obeys the basic
“BoDMAS” rule.
23
FORMULAS IN EXCEL
Relative, Absolute, and Mixed Referencing
Calling cells by just their column and row labels (such as "A1") is called relative
referencing. When a formula contains relative referencing and it is copied from one
cell to another, Excel does not create an exact copy of the formula. It will change cell
addresses relative to the row and column they are moved to.
For example, if a simple addition formula in cell C1 "=(A1+B1)" is copied to cell C2,
the formula would change to "=(A2+B2)" to reflect the new row.
To prevent this change, cells must be called by absolute referencing and this is
accomplished by placing dollar signs "$" within the cell addresses in the formula.
Continuing the previous example, the formula in cell C1 would read
"=($A$1+$B$1)" if the value of cell C2 should be the sum of cells A1 and B1. In this
case, both the column and row of the two cells in question are absolute and will not
change when copied.
Mixed referencing can also be used where only the row OR column fixed. For
example, in the formula "=(A$1+$B2)", the row of cell A1 is fixed and the column of
cell B2 is fixed. 24
FORMULAS IN EXCEL
More on Basic Functions
Functions can be a more efficient way of performing mathematical operations than
formulas. For example, if you wanted to add the values of cells D1 through D10, you
would type the formula "=D1+D2+D3+D4+D5+D6+D7+D8+D9+D10".
A shorter way would be to use the SUM function and simply type "=SUM(D1:D10)".
Several other functions and examples are given in the table below:
25
CHARTS IN EXCEL
Microsoft Excel no longer provides the chart wizard. Instead, you can
create a basic chart by clicking the chart type that you want on the Insert
tab in the Charts group.
To create a chart in Excel, you start by entering the numeric data for the
chart on a worksheet. Then you can plot that data into a chart by selecting
the chart type that you want to use on the Insert tab, in the Charts group.
The elements of the created chart include:
26
CHARTS IN EXCEL
▪ Worksheet data
▪ Chart created from worksheet data: Getting to know the elements of a chart. A chart
has many elements. Some of these elements are displayed by default, others can be
added as needed. You can change the display of the chart elements by moving them
to other locations in the chart, resizing them, or by changing the format. You can
also remove chart elements that you do not want to display.
▪ The chart area is the entire chart and all its elements
▪ The plot area is the area of the chart bounded by the axes.
▪ The data points are individual values plotted in a chart represented by bars, columns,
lines, or pies.
▪ The horizontal (category) and vertical (value) axis along which the data is plotted in the
chart.
▪ The legend identifies the patterns or colours that are assigned to the data series or
categories in the chart.
▪ A chart and axis title are descriptive text that for the axis or chart.
▪ A data label provides additional information about a data marker that you can use to
identify the details of a data point in a data series.
27
CHARTS IN EXCEL
Create a Chart
▪ On the worksheet, arrange the data that you want to plot in a chart. The data can
be arranged in rows or columns — Excel automatically determines the best way to
plot the data in the chart.
▪ Select the cells that contain the data that you want to use for the chart.
▪ NB: If the cells that you want to plot in a chart are not in a continuous range, you
can select non adjacent cells or ranges as long as the selection forms a rectangle.
You can also hide the rows or columns that you do not want to plot in the chart.
▪ Go to the Insert tab, in the Charts
▪ Click the chart type, and then click a chart subtype from the drop menu that will
appear.
▪ Click anywhere in the embedded chart to activate it. When you click on the chart,
Chart Tools will be displayed which includes the Design, Layout, and Format tabs.
▪ The chart will automatically be embedded in the worksheet. A chart name will
automatically be assigned.
28
CHARTS IN EXCEL
29
CHARTS IN EXCEL
Move Chart to New Sheet
▪ On the Design tab, in the Location group, click Move Chart. Under Choose where you
want the chart to be placed, click on the New sheet bubble. Type a chart name in the
New sheet box.
33
ADVANCED SPREADSHEET MODIFICATION
Sorting Data
▪ Sorting data is an integral part of data analysis. You might want to arrange a list
of names in alphabetical order, compile a list of product inventory levels from
highest to lowest, or order rows by colors or icons. Sorting data helps you quickly
visualize and understand your data better, organize and find the data that you
want, and ultimately make more effective decisions.
35
VIEWS OF A DOCUMENT
Print Layout View: This view displays the document on the screen the way it will look
when printed.
Full Screen Reading View: This view displays as much of the content of the document
as will fit on the screen at a size that is comfortable for reading.
Web layout view: This view displays a document on the screen the way it will look
when viewed in a web browser.
Outline view: This view displays the structure of a document as nested levels of
headers and body text, and provides tools for viewing and changing its hierarchy.
Draft view: This view displays the content of a document with a simplified layout so
that you can type and edit quickly. You cannot see layout element such as headers
and footers.
36
SAVE A SPREADSHEET
To save a document in the format used by Excel 2010 and Excel
2007, do the following:
◼ Click the File tab.
◼ Click Save As.
◼ In the File name box, enter a name for your document.
◼ Click Save.
◼ To save a document so that it is compatible with Excel 2003 or earlier, do
the following:
◼ Click the File tab.
◼ Click Save As.
◼ In the Save as type list, click Excel 97-2003 Document. This changes the
file format to .xls.
◼ In the File name box, type a name for the document.
37
◼ Click Save.
PRINT PREVIEW
Print Preview automatically displays when you click on the Print tab. Whenever you
make a change to a print-related setting, the preview is automatically updated. Click the
File tab, and then click Print. To go back to your document, click the File tab. A preview
of your document automatically appears. To view each page, click the arrows below the
preview.
Print a Worksheet
▪ Click the worksheet or select the worksheets that you want to print. Click File and the
Click Print. Once you are on the Print screen you can select printing options: To
change the printer, click the drop-down box under Printer, and select the printer that
you want.
▪ To make page setup changes, including changing page orientation, paper size, and
page margins, select the options that you want under Settings.
▪ To scale the entire worksheet to fit on a single printed page, under Settings, click the
option that you want in the scale options drop-down box.
▪ To print the specific information, select Print Active Sheets orPrint Entire Workbook.
Click Print. 38
END OF LECTURE 4
39
Summary Time
By 2 students.
40
THANK YOU
VERY MUCH