F2 Spreadsheets 002
F2 Spreadsheets 002
F2 Spreadsheets 002
Definition of a Spreadsheet
A Spreadsheet is a ledger sheet that lets the user enter, edit, and manipulate numerical data.
A Spreadsheet usually consists of a series of rows & columns in which data entries can be made.
Types of Spreadsheets:
There are 2 types of spreadsheets:
1). Manual spreadsheet:
A Manual spreadsheet is ledger book with many sheets of papers divided into rows and columns
for entering/writing data manually using a pen or pencil.
2). Electronic Spreadsheet:
A computer program that looks like the manual ledger sheet with rows & columns for entering
data that can be manipulated mathematically using formulae.
Labels
-Any text or alphanumeric characters entered in a cell are viewed as labels by the spreadsheet
program. Labels are used as row or column headings usually to
describe the contents of the row or column. For example, if the column has names of people, the
column header can be NAMES.
2
Values
-These are numbers that can be manipulated mathematically. They may include currency, numbers
(0-9), special symbols or text that can be manipulated mathematically by the spread sheet.
Formulae
-Formulae are mathematical expressions that create a relationship between cells to return a new
value.
In excel, a formula must start with an equal sign. For example =B3+D4 adds the contents of B3 and
D4 and returns the sum value in the current cell.
Functions
-These are inbuilt predefined formulae that the user can quickly use instead of
having to create a new one each time a calculation has to be carried out. For
example to add the contents of cells say B3 to E3 type =SUM(B3:E3)
To find average of the contents of cell B2, C2, D2, type =AVERAGE(B2:D2)
Database
-A database is a collection of related data items organized so as to provide a consistent and
controlled access to items.
-In spreadsheets, a worksheet may contain related data, organized into rows
that can be manipulated using database functions that enable the user to
perform functions such as sorting, filtering, validation, subtotalling, pivot
tables and consolidation.
Graphs/Charts
-A graph is a pictorial representation of the base data on a worksheet. Most spreadsheets refer to
graphs as charts. A chart enables the user to present complex data elements from a worksheet in a
simple and easy to understand format. Examples of charts are:
1. pie,
2. line, and
3. bar charts.
3
Differences between an Electronic Spreadsheet and a Calculator
An electronic spreadsheet: -
Has more memory than calculator.
Is able to perform complex logical operations, but a calculator cannot.
Uses the large storage capacity of the computer that a calculator does not have.
Has a large working area that a calculator does not have.
MICROSOFT EXCEL
This is a Spreadsheet program that enables users to create electronic worksheets that can be used to
perform simple & complex calculations using a computer.
Ms-Excel has inbuilt functions that are used as shortcuts for performing mathematical, financial and
statistical calculations.
WORKSHEET LAYOUT (Features/ Parts/ Elements of the Ms-Excel Screen)
Title bar. It has the System /Control menu button on the left & the Resizing buttons on the
right.
Menu bar: A row of buttons with respective command buttons used to manipulate the worksheet
e.g Home, Insert, Page Layout etc
Name box – displays the active cell, e.g., A1, G6
Formula bar: A bar at the top of the Ms-Excel window that is used to enter or edit values or
formulas in cells or charts. It also displays the constant value or formula stored in the active cell.
Column Identifiers (or Column headers) – Letters that identify the columns.
Row Identifiers (or Row headers) – numbers that identify the rows.
Active (Current) cell – the cell in which the selection box (Cell pointer) is placed.
Gridlines - the thin lines that indicate the cell boundaries in a worksheet.
4
THE WORKSHEET:
- A worksheet is a page stored in a workbook, and acts as the working area made up of rows and
columns where data is entered. The intersection of rows and columns forms cells.
Cell address
- The cell address is the combination of a column header and a row header that indicate the location
of a specific cell.
- A Range is any group of cells in a worksheet. The cells in a range can be adjacent or nonadjacent.
Cell Referencing
A reference is an address of a cell or range of cells in a worksheet. Cell references are the
combination of column letter, and row numbers e.g A2
There are five types of cell referencing in Ms Excel;
(a)Cell addressing (b)Relative cell referencing (c)Absolute cell referencing
(d)Mixed cell referencing(e)Referencing using names(Label cell reference)
1. Cell Adressing
There are two cell addressing styles
(i). A1
(ii). R1C1
In A1cell addressing style, the cell is identified by the column letter e.g A and followed by the row
number, e.g 1.
R1C1 cell addressing style identifies the cell starting with the row number followed by the column
number.
5
Example, a formula typed in J1 as =F1+G1, copying the same formula into cell J2, it automatically
changes to =F2+G2
3. Absolute cell Referencing
The reference is made to a specific address and does not change even if the formula is copied to
another cell. In excel an absolute cell reference is made by placing a dollar sign before the reference
e.g. $A$2.
It is used in a formula to refer to a particular cell regardless of its position in the worksheet.
4. Mixed Cell Referencing
This is a combination of relative and absolute reference in one formula, e.g. $A3 or A$3. in the first
case the column reference is absolute while the row is relative; in the second case the column
reference is relative while the row reference is absolute.
5. Referencing using names
Here, data range or argument is given a name, the name is then used in the formula. Example,
instead of typing the formula =Sum(C6:E6), you can name the data range C6:E6 as Production, then
the formula will be =Sum(Production).
To name a range of cells, select the cells then type a name in the name box then press Enter key.
6
RANK() Return the position of rank of a number from a list of values. For example, = RANK
(A2$A$3:$A$8, 1) returns the position of A2 as if the list was stored in ascending order.
MEDIAN( ) Returns the value at the center of an ordered range of numbers.
Notes.
- Cells with the value zero are included.
- If there is an even number of numbers in the set, then MEDIAN calculates the average of the two
numbers in the middle.
Example; =MEDIAN(A2:A6)
MODE() - Gives the most frequently occurring, or repetitive, value in a range of data.
Example: =MODE(A2:A7)
ROUND () Rounds a number to a specified number of decimal places. Zero rounds off the
number to the nearest integer. For example, =ROUND (49.769, 1) returns 49.8 While =ROUND
(49.769, 0) returns 50.
SUMIF () conditionally adds the specified cells according to the set criteria. =SUMIF
(A3:A10, “<=1000”) returns a value if, and only if the sum is greater than or equal to 1000.
PRODUCT () Multiplies all the values in the argument. For example, =PRODUCT (40, 3, 2)
returns 240.
3. Logical Functions
Logical functions can be used either to test whether a condition is TRUE or FALSE or to check for
multiple conditions.
Some commonly used logical functions include:
IF ( ) –Returns a value or label if a condition you specify is evaluated to TRUE and another is
evaluated to FALSE.
For example if, A3, B3, C3, D3 and E3 contained a set of marks 35, 50, 80, 60 and 45, grades are
awarded as follows:
80 to 100 A
60 to 79 B
40 to 59 C
Below 40 Fail
To assign a grade use,
=IF (A3>=80, “A”, IF (A3>=60, “B”, IF (A3>=40, “C”, “FAIL”)))
7
Example 2
Cell A2 contains the value 50.
On a budget sheet, cell A5 contains a formula to calculate the current budget.
=IF(A2<=100,"Within budget", "Over budget")
If the result of the formula in A5 is less than or equal to 100, then the function displays “Within
budget”. Otherwise, the function displays “Over budget”.
AND() Returns true if all its arguments are true or false and if any argument is false. For example,
=AND (3+2=5, 2+2=4) returns true.
OR() Returns true if any of the arguments is true or false if both the arguments are false. For
example =OR (3+2=7, 2+2=4) returns true.
NOT() Negates the unary operand. For example, =NOT (3+2=5) returns false.
NOW() Returns the current date and time formatted as the date and time. It takes no argument.
For example =NOW().
DATE() Function returns a serial number that represents a date. Ms Excel uses year 1900 serial
number. For example, =DATE (107, 1, 4) returns January 4, 2007.
HOUR(), MINUTE( ) or SECOND() Function returns the current hour as number 0 to 23, minute
from 0 to 59 and seconds from 0 to 59 respectively.
Arithmetic operators
- Arithmetic operators mostly follow the rule similar to mathematical concept of BODMAS. This
means that whatever is in parenthesis is evaluated first. Multiplication and division are evaluated
from the left to right while addition and subtraction are evaluated last.
8
Relational operators
- A relational operator returns either true or false depending on the magnitude of the value being
evaluated.
- A summary of relational operators.
= Equal to =A2=B2
> Greater than =A2>B2
< Less than =A2<B2
<> Not equal to =A2<>B2
<= Less than or equal to =A2<=B2
>= Greater than or equal to =A2>=B2
Operator precedence
- If several operators are used in a single formula, Microsoft excel performs the operations in
order shown in the order shown below.
- A formula with operators that are of the same precedence i.e. if a formula contains both
multiplication and division; operators are evaluated from left to right. Enclosing part of the formula
to be calculated in parenthesis or brackets makes that part to be calculated first.
1. #####
Causes
- This error value occurs when the cell contains a number, date or time that is wider than the cell.
-OR-
- It occurs when the cell contains a date or a time formula that produces a negative result.
Suggested action
(i). Increase the width of the column by dragging the boundary between the column headings.
OR
9
(ii). Apply a different number format in the cell to make the number fit within the existing
cell width. E.g., decrease the no. of decimal places after the decimal point.
(iii). Ensure that the date and time formulas are correct. When you subtract dates and times,
make sure you build the formula correctly.
If a formula has a result of a negative value, you can display the value by formatting the cell with a
format that is not a date or time format.
Click Cells on the Format menu, click the Number tab, then select a format that is not a date or
time format.
2. #N/A
The #NA error value occurs when a value is not available to a function or formula.
Possible cause
(i). Omitting 1 or more arguments in a function
Solution-Enter all arguments in the function
(ii). Using a custom worksheet function that is not available
Solution-Make sure the function is working properly
3. #DIV/0!
This error value occurs when you enter a formula that contains a division by zero (0).
E.g., =5/0. It may also occur when you divide a cell by another cell that is blank.
Suggested solution
(i). Change the divisor to a number other than zero.
4. #NULL!
The #NULL! error value occurs when you specify an intersection of two areas that do not intersect.
i.e., using an incorrect range operator or using an incorrect cell reference.
Suggested action
(i). Use the correct range operator. For instance, to refer to two areas that don’t intersect, use the
Comma.
E.g. if the formula sums two ranges, separate the two ranges with a comma.
=SUM(A1:A9,C1:C6).
(ii). Check for typing errors in the reference to the ranges.
5. #NAME?
The #NAME? error value occurs when Ms-Excel doesn’t recognize text in a formula.
Possible cause
Deleting a name used in the formula, or using a name that does not exist
Suggested action
Make sure the name exists.
Misspelling the name of a function
Suggested action
Correct the spelling.
Omitting a colon (:) in a range reference
Suggested action
Make sure all range references in the formula use a colon. E.g. =SUM(A1:A5)
10
Entering text in a formula without enclosing the text in double quotation marks (“).Ms-Excel
tries to interpret your entry as a name even though you intended it to be used as text.
Suggested solution
Enclose text in the formula in double quotation marks.
E.g. the following formula joins apiece of text “The total amount is” with the value in cell B5:
=”The total amount is” & B5
6. #NUM!
This occurs when a problem occurs with a number in a formula or function. E.g., Entering a formula
that produces a number that is too large or too small to be represented in Ms-Excel.
OR
The wrong data type might have been supplied in a function that requires a numeric argument.
Suggested action
(i). Change the formula so that its result is between – 1*10307 and 1*10307.
(ii). Make sure your arguments are of the correct data type
7. #VALUE!
i. Microsoft Excel may display the #VALUE! error if your formula includes cells that contain
different data types.
ii. One or more cells that are included in a formula contain text, and your formula performs
math on those cells by using the standard arithmetic operators (+, -, *, and /). For example,
the formula =A1+B1, where A1 contains the string "Hello" and B1 contains the number 3,
returns the #VALUE! error.
iii. A formula that uses a math function, such as SUM, PRODUCT, or
QUOTIENT, contains an argument that is a text string instead of a number.
8. #REF!
The #REF error value occurs when a cell reference is not valid. For instance, deleting cells referred
to by other formulas, or pasting moved cells over cells referred to by other formulas.
Suggested action
Change the formulas, or restore the cells on the worksheet by clicking Undo immediately after
you delete or paste the cells.
Editing a worksheet
Editing activities that can be applied to a worksheet are;
Inserting the required text or word through typing
Deleting worksheet cell or range content
Copying and moving cell contents
You can use the copy, cut and paste commands or use the following keyboard shortcuts:
Ctrl+C=to copy;
Ctrl+X=to cut
Ctrl+V=to paste
Insert and delete rows/columns
11
Insert and delete worksheets
Find and replace data in a worksheet
Correct spelling mistakes
Formatting worksheets
Appropriate formatting should be used to lay emphasis, attract attention and bring out the hidden
details of the worksheet.
Formatting essentially consists of changing text colour, type face, size, style and alignment.
Formatting numbers
Number Meaning
General General Format cells have no specific number format.
Number Used for general display of numbers e.g. 2345.23.
Currency For displaying monetary values e.g. $100, Ksh 10.
Accounting Lines up the currency symbols and decimal points.
Date Displays date in chosen format.
Time Displays time in chosen format.
Percentage Multiplies the value in a cell with 100 and displays it
as %.
Text Formats cells to be treated as text even when numbers are entered.
Custom For a number format not predefined in Microsoft Excel, select custom then define the
pattern.
Formatting borders
You can put a printable border around your worksheet or in a range of cells to make it more
appealing
Format a row or a column by dragging it to the size you wish
Hiding rows or columns
Hiding rows or columns prevents the display and printing of data held in particular rows or columns.
For instance, when your rows or columns contain confidential formulas not necessary in the printed
report.
Global worksheet formatting
The word global In this case refers to the entire worksheet. In order to format the whole worksheet
globally, it must be selected as a whole. Two methods can be used to select the entire worksheet.
1. Clicking at the insertion of the column and row.
2. Pressing Ctrl+A on the keyboard.
- Notice that the whole worksheet becomes highlighted. It can now be formatted as one big block using
the format cells command.
Using autoformat
- It allows the user to apply one of sixteen sets of formatting to a selected range on the worksheet. This
quickly creates tables that are easy to read and are attractive to look at.
Applying borders, shadings & patterns to a worksheet
You can apply borders to cells, shade cells with a background color, or shade cells with a color
pattern in order:
To distinguish between different types of information in a worksheet.
To make the worksheet more appealing to the eye.
12
To draw attention to important data in the worksheet.
Alignment
Alignment is the positioning of characters, text and numbers within a cell. Data can be aligned within a
cell vertically or horizontally.
The available options for horizontal alignment include;
General (aligns text to the left and numbers to the right by default)
Left
Centre
Fill: Ensures that the cell is filled with data.
Justify: Ensures that data within a cell are arranged evenly along the left and right sides of the cell.
The available options for vertical alignment include; Top, Bottom, Justify, Distributed (Text is distributed
within the cell) and Centre.
The appearance of text can also be changed by use of various options in the text control area. The
available options include;
Wrap text: Arranges a lengthy text in a cell in multiple lines so that the complete text can be read.
Shrink to fit: Changes the font size instead of the row height or column width thus reducing the size of
the text to fit in the cell.
Merge cells: Combines a range of selected cells into one cell.
Orientation: The direction of text can also be changed by typing degree or using the text direction icon
found in the Orientation area.
Worksheet data management
A worksheet may contain a list of data items that are related. Data management features available in
spreadsheets help a user manage large amount of related data. Some database operations that can be
performed on a worksheet list include: data entry using forms, sorting, filtering, sub totaling and
input validation.
Sorting Records
Sorting is arranging data alphabetically or numerically in ascending or descending order. This
feature organises data in a systematic order for grouping and quick search.
Filtering Data
Filtering refers to the display of those records that meet certain criteria (condition).
Filtering is a quick and efficient method of finding and working with a subset of data in a worksheet
that contains too much information.
There are three filtering options;
Filter for the smallest or the largest number
Filter for a number greater than or less than another number
Filter a range for rows that contain specific text
Wildcard characters can be used as comparison criteria for filters, and when searching and replacing
content.
13
Subtotals and grand totals
Subtotals function is used to summarize a worksheet list to display grouped subtotals and a grand
total. The list is grouped using a preferred field. In Microsoft Excel to insert subtotals, you first sort
the list so that the rows you want to subtotal are grouped together.
Charts/Graphs
A chart also known as graph is a visually appealing diagram generated from numerical data on a
worksheet to make it easy for users to see comparison, patterns, and trends in data.
A chart is linked to the worksheet data it’s created from and whenever data on the worksheet is modified,
the chart is updated automatically.
Types of charts
Some types of charts available in Microsoft Excel include;
1. Line chart- represents data as lines with markers at each data value in the x-y plane.
2. Column chart- represents data as a cluster of columns comparing values across categories.
3. Bar chart- data values arranged horizontally as clustered bars. Compares values across
categories.
4. Pie chart- displays the contribution of each value to a grand total.
5. Scatter chart- compares pairs of values on the same axis.
Inserting a legend
- A legend is a key to understanding a chart as it shows what each colour or pattern of data series
represent. For example, a chart may have green representing boys and pink representing girls. Without a
legend it would be difficult to know how to differentiate the two data series.
Printing workbooks
Most spreadsheets allow the user to print an entire workbook, worksheet, chart or a selected range.
Purpose for printing
Whenever you need a paper copy of the worksheet to present to other people.
If you maintain a paper filing system alongside the computer filing system.
Before printing, there are a lot of optional settings that lets the user adjust the final appearance of the
printed page to suite the requirements. They include;
Page setup
This option enables you to confirm that the page is set up correctly as per the user requirements.
Purpose for page set up
To define where one page ends and another page starts.
To print a large worksheet to fit on a single page.
To add descriptive information to be printed with your worksheet.
To define rows and columns you want to print on each page of the output.
To change the order in which various worksheets should print.
14
You can control the appearance or layout of printed worksheets by changing options in the Page
Setup dialog box.
Under page tab button, the following adjustments can be done
Orientation: This is the page layout. Orientation can be either portrait (The vertical side of the
paper is longer than the horizontal) or Landscape (The horizontal side of the paper is longer than the
vertical)
Scaling: This makes the data fit a page or number of pages as per the user requirement.
Other changes that can be made include setting paper size, centering data on the printed page and
controlling how the pages are numbered.
Margins: This involves setting the margins at the top, bottom, right and left of the page.
Header and footer: These refer to short sentences describing the content of the topic, author’s
name, title of the worksheet etc.
Headers appear at the top margin of every page while footers appear at the bottom margin of every
page.
Print Preview
This option is used to show the worksheet exactly the way it will appear when printed.
The option provides opportunity for making corrections or changes to the appearance of the page
before printing it.
Print Options
To print, select the Print option from the File menu (Office button) OR
Use the keyboard shortcut by pressing CTRL+P
Printer Selection
To print, a printer must be installed to your computer. If several printers have been installed to the
computer, their names will appear on the printer Name box. By clicking on the drop down menu, all
the installed printers will be displayed. Select the printer to use.
Print What Option
This option provides for
Selection: When checked, the selected worksheet area is printed
Active sheet(s): Prints the pages in the active worksheets
Entire Workbook: Prints all the worksheets in the whole workbook
Finally, specify the number of copies, then click OK to start printing the job.
15