COM 111 COMPUTER APPLICATION
Chapter 7: Spreadsheets
Objectives
At the end of the chapter the learner shall be able to;
Explain the different Spreadsheet terms
Create a new spreadsheet and open an existing one
Input text, numbers and simple formulae
Employ simple functions such as SUM, AVERAGE
Create and modify charts/graphs to illustrate data
7.1 Introduction
Spreadsheets are application packages used for manipulation of figures. A spreadsheet usually consists of a
series of rows and columns. The figures or text are inserted into cells. Examples include Ms Excel, Lotus
1-2-3, Supercalc, Quattro Pro. From the examples given, we shall tackle Ms Excel.
Applications of Spreadsheets
1. Can be used to record sales, produce invoices and compile statements.
2. Researchers can compile and analyze their results.
3. Teachers can compile their students‟ marks and produce overall results.
4. Clerks and secretaries can easily create tables of figures and manipulate.
5. Excel can also be used to visualize data
7.1 MICROSOFT EXCEL 2007/ 2010
Starting Excel
Option 1
Click the start button
Click All programs
Select Microsoft Office menu
Select and click Microsoft Excel menu item
Option 2
Click the excel button on the Microsoft shortcut if only if the option available
7.2 The Excel Window
Window
When you work in Excel, you use workbook files to hold your information. Each workbook consists of
several worksheets made up rows and columns of information. A workbook therefore allows you to
organize various kinks of related information in a single file (or workbook)
Worksheet
A worksheet is one sheet in an Excel workbook. Each worksheet consists of 256 columns and 65,536 rows.
Columns
Columns are the vertical divisions of a worksheet that are identified by letters. The columns begin with A
and proceed through the alphabet. The 27th column is AA followed by AB, AC, and this convention for
naming continues through the entire alphabet until you end up with the last column (column 256) which is
designated IV.
Rows
Rows are the horizontal divisions of a worksheet and are identified by numbers.
Com 111 – Chapter 7: Spreadsheets Page 1
Cells
A cell is the intersection of a row and a column. Each cell has an address that consists of the column letter
and row number (A1, B3, C5 and so on).
Each cell is capable of containing different types of information e.g. text, number, times, formulas. Excel
data basically comes in two varieties: labels and values.
A label is a text entry consisting of alphanumeric characters. It is called a label because it typically
provides descriptive information such as the name of a place, person, e.t.c. A label has no
numerical significance in Excel.
A value is data that has numerical significance. These include numbers, dates and times that you
enter on your worksheet. Values can be acted on by formulas and functions.
The figure below shows the elements of an Excel window.
Tool
Menu bar Formula bar Column Headings
bars
Worksheet tabs Status bar
Row Headings
Cell Selector
Element Description
Formular bar When you enter information into a cell, it appears in the Formula bar.You can
use the formula bar to edit the data later. The cell‟s location also appears.
Column Headings The letters across the top of the worksheet, which identify the columns in the
worksheet.
Row Headings The numbers down the side of the worksheet, which Identify the rows in the
worksheet.
Cell Selector The dark outline that indicates the active cell. It
Highlights the cell you are currently working in.
Com 111 – Chapter 7: Spreadsheets Page 2
Worksheet tabs These tabs help you move from worksheet to worksheet within the workbook. The
active Worksheet is displayed in bold.
Active cell It indicates the cell in which the typed data will be entered. It is also known as the
current cell.
7.3. Create a new workbook
Option 1
1. Click the Office button, then click New on the menu
2. Select Blank workbook and click create.
7.4. Saving a workbook
1. On the Office button, click save as
2. Click the appropriate document format
3. In the save in text box click and specify the location to save in.
4. In the file name text box type the name of the file.
5. Click save.
NB
The first time you click „save as‟ from the file menu, the Documents library folder is displayed by default
as the folder to save in.
Close a workbook/ Excel
To Close current workbook only: On the office button menu click close.
To Exit: On the office button menu click Exit Excel button
7.5. Excel 2007/ 2010 Menus
Home Menu
Allows access routine commands used in Excel worksheets manipulation
Com 111 – Chapter 7: Spreadsheets Page 3
Insert Menu
Allows access to Insert command / tools
Page Layout Menu
Used to access Page layout formatting commands / tools
Formulas Menu
Allows access to the function command
Data Menu
Access to the Data manipulation commands/tools
Review Menu
Com 111 – Chapter 7: Spreadsheets Page 4
View Menu
Add-Ins Menu
7.5. WORKING WITH WORKBOOKS AND WORKSHEETS
Moving around in a worksheet
To move between cells on a worksheet, click any cell or use the arrow keys. When you move to a cell, it
becomes the active cell (the selected cell in which data is entered when you begin typing. Only one cell is
active at a time. A heavy border bound the active cell)
To see the different area of the sheet, use the scroll bars.
Switch to another sheet in a workbook
Click the sheet tab
(A tab near the button of a workbook window that displays the name of a sheet).
To display a shortcut menu, click a tab with the right mouse button.
To scroll through the sheet tabs, use the tab scrolling buttons to the left of the tabs)
Insert a new worksheet
1. Click any worksheet name
2. Click insert
Delete sheets from a workbook
1. Click the worksheet name
2. Right Click, then Click Delete.
Rename a sheet
1. Click the worksheet name
2. Right click, then click rename.
3. Type the new name over the current name.
Hide a sheet
1. Click the worksheet name want to hide.
2. Right click, Click hide.
Display a hidden sheet
1. Click any worksheet name
2. Right Click, and click Unhide
3. Choose the worksheet to unhide
Com 111 – Chapter 7: Spreadsheets Page 5
4. Click Ok.
7.6. ENTERING DATA
Enter numbers, text, date, or time
1. Click the cell where you want to enter data.
2. Type the data and press ENTER or TAB.
Use a slash or a hyphen to separate the parts of a date, for example, type 8/6/99 or jun-99
To enter a time based on the 12-hour clock, type a space and then a or p after the time for example, 9.00 p.
Otherwise, Microsoft Excel enters the time as AM.
Enter a formula
1. Click the cell in which you want to enter the formula.
2. Type = sum(
3. Enter the formula and Close the bracket
4. Press ENTER.
Enter the same data into several cells at once
1. Highlight the cells where you want to enter data.
The cells can be adjacent or nonadjacent
2. Type the data and press CTRL+ENTER
Fill in a series of numbers, dates or other items
1. Select the first cell in the range you want to fill and enter the starting value for the series.
To increment the series by a specified amount, select the next cell in the range and enter the next item
in the series. The difference between the two starting items determines the amount by which the series
is incremented.
2. Select the cell or cells that contain the starting values.
3. Drag the fill handle over the range you want to fill.
To fill in increasing order, drag down or to the right.
To fill in decreasing order, drag up or to the left.
Cancel or undo an entry
1. To cancel an entry before you press ENTER, press ESC.
2. To undo a complete entry, click Undo button on the standard tool bar.
Tips on entering numbers
1. To avoid entering a fraction as a date, precede fractions with a 0 (zero); for example, type0 ½ (there is
a space between zero and ½)
2. Precede negative numbers with a minus sign (-), or enclose the numbers in parentheses ().
Com 111 – Chapter 7: Spreadsheets Page 6
Select cells, ranges, rows and columns
To select Do this
A single cell Click the cell, or press the arrow keys to move to the cell
A range of cells Click the first cell of the range and then drag
to the last cell.
All cells on a worksheet Click the select All button
Nonadjacent cells or cell ranges Select the first cell or range of cells, and then hold down CTRL
and select the other cells or ranges.
A large range of cells Click the first cell in the range, and then hold
down SHIFT key and click the last cell in the range
An entire row Click the row heading.
An entire column Click the column heading.
Adjacent rows or columns Drag across the row or column headings
Non-adjacent rows or columns Select the first row or column, and then hold down CTRL and
. select the other rows or columns
Select sheets in a workbook
If you select more than one sheet, Microsoft Excel repeats the changes you make to the active sheet on all
other selected sheets. These changes may replace data on other sheets.
To select Do this
A single sheet Click the sheet tab.
Two or more adjacent sheets Click the tab for the first sheet and then hold down
SHIFT and click the tab for the last sheet.
Two or more nonadjacent sheets Click the tab for the first sheet and then hold down
CTRL and click the tabs for the other sheets.
All sheets in a workbook Right click a sheet tab and then click Select All
Sheets on the shortcut menu.
To cancel a selection of multiple sheets in a workbook, click any unselected sheet.
If no unselected sheet is visible, right click the tab of a selected sheet then click Ungroup Sheets on the
shortcut menu.
Clear or delete cells, rows or columns
When you delete cells, Microsoft Excel removes them from the worksheet and shifts the surrounding
cells to fill the space.
When you clear cells, you remove the cell contents (formulas and data), formats or comments but
leave the blank cells on the worksheet.
To clear contents, format or comments from cells
1. Select the cells, rows or columns that you want to clear.
2. On the Edit menu, point to clear and then click All, contents, Format or comments.
Delete cells, rows or columns
1. Select the cells, rows or columns you want to delete.
2. On the Edit menu, click Delete.
Undo mistakes
1. To undo recent actions one at a time, click Undo on the edit menu.
2. To undo several actions at once, click the arrow next to Undo button on the standard toolbar and select
from the list. Microsoft Excel reverses the selected action and all actions above it.
3. To undo several actions at once, click the arrow next to Undo button on the standard toolbar and select
from the list. Microsoft Excel reverses the selected action and all actions above it.
Com 111 – Chapter 7: Spreadsheets Page 7
Insert cells, rows or columns
You can insert blank cells, rows and columns and fill them with data.
Insert blank cells
1. Select a range of existing cells where you want to insert the new blank cells.
2. Select the same number of cells as you want to insert.
3. On the Home Menu, click insert cells.
Insert rows
1. To insert a single row, click a cell in the row immediately below where you want the new row. For
example, to insert a new row above Row 5,click a cell in Row 5.
To insert multiple rows, select rows immediately below where you want the new rows, select the same
number of rows you want to insert.
2. On the Home Menu, click insert.
The application to insert rows above the selection
Insert columns
1. To insert a single column, click a cell in the column immediately to the right of where you want to
insert the new column. For example, to insert a new column to the left of column B, click a cell in
column B
2. To insert multiple columns, select columns immediately to the right of where you want to insert the
new columns. Select the same number of columns as you want to insert.
3. On the Home Menu, Click insert.
7.7. FORMATTING A WORKSHEET
Change the size, font, colour, or other text format
You can specify a font, font size and font color by clicking buttons on the Formatting toolbar.
Change the font or font size
1. Select whole cells or the specific text in a single cell that you want to format.
2. In the Font box, click the font you want.
3. In the Font size box, click the font size you want (on the formatting toolbar)
Make selected text or numbers bold, italic or underlined
1. Select whole cells or the specific text in a single cell that you want to format.
2. On the formatting toolbar, click a button for the format you want.
To make text Click
Bold
B
Italic
I
Underlined U
Change the text color
1. Select whole cells or the specific text in a single cell that you want to format.
2. To apply the recently most selected color, click Font Color A
To apply a different color, click the arrow next to Font Color A and then click a color on the palette.
7.8. APPLYING BORDERS
To apply border styles
1. Click Cells and on the Home Menu, click the Borders tab
2. Select the border type from the list
Com 111 – Chapter 7: Spreadsheets Page 8
To change the line style of an existing border
1. Select the cells on which the border is displayed.
2. Click the Borders tab on the Home Menu
3. Select More Borders tab
4. Select the line style
5. Click Ok
To shade cells with patterns
1. Select the cells on which the border is displayed.
2. Click the Borders tab on the Home Menu
3. Select More Borders tab
4. Click Fill tab
5. Click to open the pattern style selection box
6. Select the pattern style
7. Click Ok
Com 111 – Chapter 7: Spreadsheets Page 9
Add background patterns to an entire sheet
1. Click the sheet to which you want to add a background pattern
2. On the page layout Menu Click the Background tab
3. Select the graphics file to use for the background pattern
The selected graphic is repeated to fill the sheet. You can apply solid color shading to cells that contain
data.
7.9. Change Column width and Row height
You can adjust the width of columns and the height of rows. You can also define the default width of
columns for a worksheet. Defining the default column width adjusts all columns to the same width except
columns that have previously been changed.
Change column width
Using different options
1. Drag the boundary on the right side of the column heading until the column is the width you want.
2. To change the column width for multiple columns, select the columns you want to change. Then drag a
boundary at the right of a selected column heading.
3. To change the column width for all columns on the worksheet, click the Select All button (at the left
edge of the borders) and then drag the boundary of any column heading.
4. To make the column width fit the contents, double-click the boundary to the right of the column
heading
Change row height
Using different options
1. Drag the boundary below the row heading until the row is the height you want.
2. To change the row height for multiple rows, select the rows you want to change then drag a boundary
below a selected row heading.
3. To change the row height for all rows on the worksheet, click the Select All button (at the left edge of
the borders) and then drag the boundary below any row heading.
4. To make the row height fit the contents, double-click the boundary below the row heading.
The Fill Handle
The fill handle enables you to extend a series. It is also used for copying formulas.
Procedure
1. Position the mouse pointer right on the block like mark in the bottom right corner of the active cell.
2. Click and drag to extend a series.
Format Command
1. Select the rows or columns
2. On the Home menu click to open the Format sub-menu
3. Select the type of formatting required
4. Specify the row height or Column Width
5. Click Ok.
Com 111 – Chapter 7: Spreadsheets Page 10
7.10. OPERATORS
Operators are signs or symbols which specify the type of a calculation that you may perform in the
elements of a formula.
There are four different types of calculation operators i.e.
1. Arithmetic
2. Comparison
3. Text and
4. Reference
7.10.1. ARITHMETIC OPERATIONS
They perform basic mathematical operations e.g. addition, subtraction, multiplication and division.
Operator Performs Sample Formula Result
^ Exponentiation =A1^3 Enters the result of
raising the value in
cell A1 to the third
power.
+ Addition =B1+B2 Enters the total of
The values in cells B1 and B2.
- Subtraction =B1-B2 Subtracts the value
In cell B2 from the value
in cell B1.
* Multiplication =A1*B1 Multiplies the value
cell A1 by cell B1.
/ Division =A1/B1 Divides the value in
cell A1 by the value
in cell B1.
7.10.2. COMPARISION OPERATORS
They compare two values then produce a logical value i.e. TRUE or FALSE.
OPERATOR EXAMPLE
= (Equal to) A1=B1
> (Greater than) A1>B1
< (Less than) A1<B1
>=(Greater or equal to) A1>=B1
<=(Less or equal to) A1<=B1
<>(Not equal to) A1<>B1
Com 111 – Chapter 7: Spreadsheets Page 11
7.10.3. REFERENCE OPERATORS
OPERATOR EXAMPLES
:(COLON) Range operators which
produces one reference for all the cells B5:B15
between two references.
,(COMMA) Union operator which combines
multiple references into one. Sum (B5:B15,
D5:D1)
7.10.4. FORMULAS
A formula is an equation that analyses data in a worksheet. Formulas perform operations e.g. addition,
multiplication, comparison etc. They can refer to other cells on the same worksheet as well as other sheets
in the same workbook or even in other workbooks .A formula must always begin with an equal sign or
symbol e.g.=10-5. The result of the formula is then displayed in the cell.
You can use parentheses to change the syntax (structure or order of elements)
e.g. in the formula =5+2*3 Excel carries multiplication first. If the parentheses are used, the syntax
changes.
E.g. =(5+2)*3
7.10.5. FUNCTIONS
This is a special kind of predefined by Excel
The specific arguments required by a function depend on what the function does.
a. THE SUM FUNCTION
The sum function sums up a range total. This function saves time e.g. instead of creating a formula =
A1+B1+C1+A2+B2+C3+A3+B3+C3 a sum function will make it easy i.e.
=SUM (A1:C3)
Please, note the reference operator :(colon)
b. RETURN VALUES OF FUNCTIONS
AVERAGE: If cell A1 contains value 12 and B1 value 8,the function =average (A1:B1)
returns 10.
MODE: This is the most frequently occurring or repetitive value in an array of data
syntax e.g. =mode (10,3,4,3,5,3,7,3,4)
N/B If a data set has no duplicate values, mode returns the # N/A error value.
MEDIAN: This is the middle value or the number in the middle of a set of numbers
Syntax e.g. =median (2,4,6,8,10)
Numbers in the middle e.g.
Com 111 – Chapter 7: Spreadsheets Page 12
=Median (1,2,3,4,5) equal 3
=Median (1,2,3,4,5,6,) equals to 3.5 and this is the average of 3+4
Excel Error Values
The various types of errors you may encounter as you use formulas are:
Error Description
#DIV/0! The formula is attempting to divide by zero. Check the cell references for
blanks or zeros that may have resulted if you deleted a cell referenced by
the formula.
#N/A The formula refers to a cell with a #N/A entry or a cell that contains no value
This error warns you that not all the data referenced by a formula is available.
#NAME? Excel doesn‟t recognize a name you entered in a formula. Verify that all names in
the formula exist and define any missing names.
If applicable, verify that you used the correct function name.
#NULL! The formula specifies two areas that don‟t intersect. Check to see if you entered
the cell or range reference incorrectly. Remember to use commas (not spaces)
between function arguments.
#NUM! There is a problem with a number used in the formula. Check for the correct use of
function arguments.
#REF! A cell reference in the formula is incorrect. Check for changes to cell reference
caused by deleting cells, rows or columns referenced by the formula.
#VALUE! The formula contains the wrong type of argument or operator.
Check for the correct syntax of the formula.
7.11. INTRODUCTION TO DATA ANALYSIS
Ways to analyze statistics
Microsoft Excel provides a set of data analysis tools called the Analysis Toolpak that you can use to save
steps when you develop complex statistical or engineering analyses. You provide the data and parameters
for each analysis; the tool uses the appropriate statistical or engineering macro functions and then displays
the results in an output table. Some tools generate charts in addition to output tables.
To view a list of available analysis tools, click Data Menu Tab.
N/B If the Toolpak is not available from the tools menu, click Add-Ins from the tools menu then choose
Analysis Toolpak.
USING DESCRIPTIVE STATISTICS
Procedure
1. From the tools menu choose and click Data Analysis.
2. From Analysis tools choose and click Descriptive statistics.
3. From the resulting dialogue box, choose as desired as explained below;
Input Range
Enter the cell reference for the range of data you want to analyze. The reference must consist of two or
more adjacent ranges of data arranged in columns or rows.
Grouped By
To indicate whether the data in the input range is arranged in rows or in columns, click Rows or Columns.
Labels in First Row/Labels in First Column
If the first row of your input range contains labels, select the labels in First Row check box. If the labels
are in the first column of your input range, select the Labels in First Column check box. This check box is
clear if your input range has no labels; Microsoft Excel generates appropriate data labels for the output
table.
Com 111 – Chapter 7: Spreadsheets Page 13
Output Range
Enter the reference for the upper left cell of the output table. This tool produces two columns of
information for each data set. The left column contains statistics labs and the right column contains the
statistics. Microsoft Excel writes a two-column table of statistics for each column or row in the input range
depending on the Grouped By option selected.
New Worksheet Ply
Click to insert a new worksheet in the current workbook and paste the results starting at cell A1 of the new
worksheet. To name the new worksheet, type a name in the box.
New Workbook
Click to create a new workbook and paste the results on a new worksheet in the new workbook.
SUMMARY STATISTICS
Select if you want Microsoft Excel to produce one field for each of the following statistics in the output
table: Mean, Standard Error (of the mean), Median, Mode, Standard Deviation, Variance, Kurtosis,
Skewness, range, Maximum, Minimum, Sum, Count, Largest (#), Smallest (#), and Confidence Level.
Merge cells to span several columns or rows
Merging combines two or more selected adjacent cells to create a single cell. The resulting merged cell
contains the upper left-most data in the selection which is centered within the cell. The cell reference for a
merged cell is the upper-left cell in the original selected range.
1. Select the cells that you want to merge.
2. To merge cells in a row and center the cell contents, click Merge and Center.
To merge any selection of cells within a row or column, click cells on the Format menu, click the
Alignment tab and then select the Merge cells check box.
Applying an auto format to a range
1. Select the range you want to format.
2. On the Home Menu, Click format tab
3. Click AutoFormat.
4. In the Table box, click the format you want.
5. Click Ok.
To use only selected parts of the autoformat, click Options and then clear the check boxes for the formats
you don‟t want to apply.
Remove an autoformat from a range of cells
1. Select the range that has the autoformat you want to remove.
2. On the Format menu, click Autoformat.
3. In the Table box, click None.
4. Click Ok.
7.12. WORKING WITH CHARTS
You can display Microsoft Excel data graphically in a chart. Charts are linked to the worksheet data they
are created from and are updated when you change the worksheet data. You can create charts from cells or
ranges that are not next to one another.
1. Select the cells that contain the data that you want appear in the chart.
2. On the Insert Menu, Select the Chart type from the Charts tab
3. Follow the instructions in the Chart Wizard.
Com 111 – Chapter 7: Spreadsheets Page 14
Example
Enter the following Data
Name Marks
John 85
Michael 78
Nancy 90
Jane 79
Mary 86
Peter 56
Margaret 45
To draw a Bar Graph
1. Highlight the Data
2. Click Insert Menu
3. Select Colum from the Charts section
4. Select the 1st option of the 2-D Column charts
Com 111 – Chapter 7: Spreadsheets Page 15
Create a chart from non-adjacent selections
1. Select the first group that contains the data you want to include.
2. While holding down CTRL key, select any additional cell groups you want to include.
3. On the Insert Menu, Select the Chart type from the Charts tab
4. Follow the instructions in the Chart Wizard.
Add a text box to a chart
1. Click the chart to which you want to add a text box.
2. On the Insert Menu, click Text box Icon.
3. Click where you want the text box and then drag until the box is the size you want.
4. Type the text you want in the box. The text will wrap inside the box.
5. When you finish typing, press ESC or click outside of the text box.
Select a different chart type
1. Click the chart you want to change.
2. On the Chart menu, click Chart type.
3. On the Standard Types or Custom types tab, click the chart type you want
Custom chart types
1. When you create a chart or want to change the chart type, you can choose between a standard chart
type and a custom chart type.
2. With a custom chart type, which is similar to a template, you can quickly change the look of your
chart. Each custom chart type is based on a standard chart type and contains additional formatting and
options such as a legend, gridlines, data labels, a secondary axis, colors, patterns, fills and placement
choices for various chart items.
1. Click the chart you want to change.
2. On the Chart menu, click chart type.
3. On the custom Types tab, click the chart you want.
Example : To add the Axis labels
1) Click the Chart, Excel automatically highlights the Charts Tool Menu
2) Select Design sub-menu
3) Select the appropriate design from the Charts layouts
Com 111 – Chapter 7: Spreadsheets Page 16
Move and resize chart items by the use of the mouse
You can use the mouse to resize and move the chart area, the plot area and the legend. Microsoft Excel
automatically sizes titles to accommodate their text. You can move titles with the mouse but not resize
them.
1. Click the chart item.
2. To move a chart item, point to the item and then drag it to another location.
To resize a chart item, point to a sizing handle.
When the mouse pointer changes to a double-headed arrow, drag the sizing handle until the item is the size
you want.
Rotate text in a chart title or along an axis
You can rotate or “angle” text in a chart or along an axis. However, you cannot rotate legend text.
1. Click the axis or the title you want to format.
2. If you clicked an axis, click Axis on the Format menu.
3. Click the Alignment tab.
4. To rotate text, under Orientation, click a degree point or drag the indicator to the position you want.
6.13. About using a list as a database
In Microsoft Excel, you can easily use a list as a database. When you perform database tasks such as
finding, sorting or subtotaling data, Microsoft Excel automatically recognizes the list as a database and
uses the following list elements to organize the data.
The columns in the list are the fields in the database.
The columns labels in the list are the fields names in the database.
Each row in the list is a record in the database.
Sorting a list
You can rearrange the rows or columns of a list based on the values in the list by sorting. When you sort,
Microsoft Excel rearranges rows, columns or individual cells by using the sort order that you specify. You
can sort lists in ascending (1 to 9,A to Z) or descending (9 to 1,Z to A) order and sort based on the contents
of one or more columns.
Sort in ascending or descending order
1. Click a cell in the column you would like data sort. A Z
2. On the Data Menu, Click the Sort Button Z A
3. Select the sort type
4. Click Ok.
Com 111 – Chapter 7: Spreadsheets Page 17
Sort columns based on the contents of rows
1. Click a cell in the list you want to sort.
2. On the Data menu, click sort.
3. Select the Sort by Column
4. Select the Sort on value
5. Select the Sort order
6. Click Ok.
Using apply filter
Autofilter
Displays only those rows that match the value in the active cell and inserts Autofilter arrows to the right of
each column label.
Show all
Displays all of the rows in a filtered list.
Com 111 – Chapter 7: Spreadsheets Page 18