Topic 1: USING SPREADSHEETS
By the end of this topic students must be able to:
1 use formulae to solve practical problems
2 sort data
3 filter records
4 create charts and graphs in a worksheet
5 format charts
6 set up a page for printing
7 import files into a spreadsheet
8 link files
_____________________________________________________________________________________
USING FORMULAE TO SOLVE PRACTICAL PROBLEMS.
In form 3, we discussed number of formulae and functions that can be used to solve problems that we
meet.
Practice using the following examples to familiarize yourself with different formulae that can be used
in practical situations.
EXAMPLES
1. In an election, there are three candidates: Mathews Gondwe, Jafali Benson and Enita Yona.42% of the
voters voted for Mathews Gondwe, 35% for Enita Yona and the rest for Jafali Benson. If there were 20
Million voters, how many voted for each candidate?
SOLUTION
a. Launch Microsoft Excel
b. Enter and format the data as shown below:
c. Enter the following formula in B6 and then press Enter
= 100 –B4 –B5
d. Enter the following formula in cell C4
=B4/100*$B$1
e. Use Auto fill handle to replicate the formula in step d above to the rest of cells (up to C6).
f. Enter the following function in cell C8 and then press Enter
=SUM (C4:C6)
2. A man made a will in which he left 1/5 of his money to his and 2/7 of the remainder to his only son.
The rest was to be shared equally among ten orphanages in his home district. If the total money he left
was K 5, 250, 000. What was the share of each beneficially?
SOLUTION
a. Enter and format the data as shown below
b. Enter the following formula in cell B4 and then, press Enter:
=1/5*B1
c. Enter the following formula in cell B5 and then, press Enter:
=2/7*(B1-B4)
d. Enter the following formula in cell B6 and then press Enter:
= ($B$1-$B$4-$B$5)/10
e. Use Autofil handle to copy the formula in step d above to rest of the cells.
f. Enter the following function in cell B17 and then press Enter
PRACTICAL EXERCISE
Below is a sample worksheet of information collected in an economic survey.
THE BUREAU OF STATISTICS
POPULATION ECONOMIC SURVEY 2014
Town Male Female Literate Illiterate Income/ Total Income/ Income/
person/ income/ Person/ person/
year City/year month day
LILONGWE 3000000 4000000 5000000 2000000 60000
LIMBE 5000000 6000000 6000000 5000000 50000
MALOSA 4000000 5000000 4000000 5000000 30000
MWANZA 6000000 6000000 7000000 7000000 40000
NGABU 1100000 2200000 2500000 800000 10000
LUCHENZA 500000 800000 300000 1000000 20000
NCHALO 12000000 16000000 8000000 2000000 5000
BLANTYRE 5500000 6600000 2000000 101000 2000
TOTAL INCOME
a. Create a workbook to store the information and save it as CENSUS. xlsx
b. Use the relevant formula to compute the income per person per month for a 12 month
year.
c. Calculate the total:
i. Income for each city per year in millions.
ii. Income for all the cities per year. Use a relevant function.
iii. Daily income per person in each province assuming all the months have 30 days. Format
the cells to 2 decimal places.
SORTING
Sorting is the process of arranging items of the same kind in an ordered sequence.
Items to be sorted must be in the same column or row.
Data can be sorted alphabetically or numerically.
Sorts can either be ascending (A-Z) or descending (Z-A) order.
Sorting is important because it enables quick searching of data.
PROCEDURE FOR SORTING
1. Highlight the range of cells that you want to sort.
2. On the Home tab, click the Sort and Filter icon found within the Editing group then select the Custom
Sort Command. Alternatively, on the Data tab click Sort icon found within the sort and filter group.
3. In the sort dialog box, select the field to be used as the key for sorting and sort order as either
descending or ascending then click OK button to apply.
FILTERING DATA
It is a spreadsheet means to set conditions so that only certain data is displayed.
It helps to focus on specific information in a large worksheet of data.
Filters work with rows of data in the worksheet.
The condition set to filter are compared with one or more records in the row, if the conditions is met
then record (s) are displayed.
TYPES OF DATA FILTERING IN A SPREADSHEET
1. Numeric: numeric data can be filtered based on:
Whether or not the data is greater than or less than a specific number
Whether or not the data equals a certain number
The data is above or below the average value of the data as a whole
2. Text: text data can be filtered based on:
Whether or not the data matches a certain word.
Whether the data is word containing one or more letters
Whether the data is word that begins or ends with a specific letter of the alphabet.
WILDARD CHARACTERS IN DATA FILTERING
Wildcard is a special symbol that represents on or more characters.
The mostly used wildcard characters are
Asterisk (*): represents zero or more characters
Question mark (?): represents a single character.
Wildcards enable users to select multiple records with a single specification.
For example in Microsoft excel asterisk (*) is a wildcard that stands for any combination of letters e.g.
y* refers to all records that begin with letter y and *y refers to all records that end with y.
Similarly, the specification ???? refers to all records that have four characters.
a. Creating filters
1. Click the table containing data to be filtered.
2. Click Sort & Filter icon on the Home tab in the Editing group and then choose Filter. All the
column headings will now have drop-down arrows next to them.
3. Click the dropdown arrow of the column which you want to Filter By and uncheck Select All box.
Choose your filtering specifications.
b. Clearing individual filters
1. Click the Filter icon next to the column heading from which you want to clear the filters.
2. Select Clear Filter From “column heading name” from the drop-down menu
3. Click Ok
c. Clearing all filters
1. Click Sort & Filter icon on the Home tab in the Editing group
2. Click Filter. All the drop-down arrows on your worksheet will disappear.
d. Creating filters with Wildcards –Asterisk (*)
1. Click Sort & Filter icon on the Home tab in the Editing group and then, choose Filter
2. Click the drop-down arrow next to the column which needs to be filtered.
3. Select Text Filter and then, click Equals. The custom AutoFilter dialog box appears.
B*
4. Type B* as shown above, then click Ok. Only names starting with the letter ‘B’ will be displayed.
5. Clear all filters from the worksheet.
6. Click the drop-down arrow next any other column to be filtered.
7. Select Text Filter and then, click Equals. The custom AutoFilter dialog box appears as above.
8. Type *A, then click Ok. Only names ending with the letter ‘A’ will be displayed.
e. Creating filters with question mark (?)
1. Clear all the filters.
2. Click the drop-down arrow next to any column to be filtered.
3. Select Text Filter and then, click Equals. The custom AutoFilter dialog box appears as shown
below:
????
4. Type ???? as shown above and then click Ok. Since a question mark represents a single character,
only names with four characters will be displayed.
f. Filtering numeric data
1. Clear all filters
2. Click the drop-down arrow nets to a column to be filtered, the column must contain numbers.
3. Select Number-Filters and then, click Greater Than. The custom AutoFilter dialog box appears
as below:
Click here
4. Click the drop-down arrow as shown above and choose a figure for example 50. Only numbers
greater than 50 will be displayed.
CHARTS, IMPORTING AND LINKING FILES IN SPREADSHEETS.
A chart is a diagram that displays detailed information of numerical data.
It indicates relationships between two or more variable quantities.
Charts and graph are words that are used interchangeably though they may not be exactly the same.
TYPES OF CHARTS IN A WORKSHEET
The following are charts found in Microsoft- Excel:
Column or bar charts
Line charts
Pie charts
Area charts
Scatter charts
Stock charts
Surface charts
Doughnut charts
Radar charts.
Each of the charts has a variety of charts from which a user can choose.
All charts are created from Insert tab. In the charts group.
CREATING CHARTS AND GRAPHS IN A WORKSHEET
Example: create a chart of sales against month for Dzuka retail shop as below
1. Enter the following data in an Excel Spreadsheet.
2. Select month column including heading A2:A11
3. Select the sales column while holding Control key, or simply select month and sales column all at
once.
4. Click insert tab and select any type of chart you want
Alternatively, click on the Dialog Box Launcher on the bottom right corner of the charts group in the
Insert tab to launch the Insert chart dialog box and then click on any chart type of your choice as below:
A CHART OF SALES AGAINST MONTH
200,000.00
180,000.00
160,000.00
140,000.00
120,000.00
SALES
100,000.00
80,000.00
60,000.00
40,000.00
20,000.00
-
MONTH
Alternatively, Press F11 on the keyboard. A chart like the one above will be created.
CREATING A CHATS WITH TWO SETS OF DATA
Example: create a chart of sales and tax against month for Dzuka retail shop as below
1. Select month, sales and tax columns including their headings in your worksheet.
2. Click insert tab and select any type of chart you want
MOTHLY SALES AND TAX PAYABLE AT DZUKA
RETAIL SHOP
200,000.00
180,000.00
160,000.00
140,000.00
120,000.00
100,000.00
80,000.00
60,000.00
40,000.00
20,000.00
-
SALES TAX
3. A chart similar to the above will be inserted. Or follow other alternative ways of inserting a chart.
CHANGING CHART TYPES
To change chart type for example from column chart to pie chart,
1. Click the chart to be changed for instance a chart of sales against month as used in the previous
examples.
2. Select a Chart type in the Charts group on the Insert tab and click. For example choose Pie chart
and it will be inserted as shown below:
MOTHLY SALES AT DZUKA RETAIL
SHOP
JANUARY
FEBRUARY
14% 8%
11% MARCH
14% APRIL
11%
MAY
13% 9% JUNE
12% 8%
JULY
AUGUST
FORMATTING CHARRTS
To format charts is to add features that make the chart look attractive.
To format chart successfully, you need to know its parts.
Formatting charts in worksheets involves;
Changing colour of data series
Changing the attributes of data labels
Adding data labels
Changing chart layout
Changing chart styles
a. Changing colour of the data series
To format data series:
1. Right click on any of the data series.
2. Click Format Data Series. The Format Data Series dialog box appears.
3. Select Fill and then, click Solid Fill
4. Choose the colour of your choice.
5. Click close
b. Adding or changing chart title, axes title, legend, data table, axes and gridlines
To add or change the attributes of any of the above chart parts,
1. Choose the part you want to change or add on the layout tab in the Labels, axes or Background
group. In newer versions, it is under Design tab, Add chart element, and Chart layout group.
2. Read and follow the instructions for each part or select the required element of your choice in
newer versions.
c. Changing chart layout
To change chart layout,
1. Click on the drop down arrow next to the Chart Layouts group on the Design tab
2. Explore and select a chart Layout of your choice.
d. Changing chart styles
A chart style is mainly a theme of formatting for your chart using the existing elements of your chart.
To apply a chart style:
1. Select your chart
2. Click on the drop-down arrow to the right of the Chart styles group on the Design tab
3. Select a chart style of your choice.
SETTING A PAGE FOR PRINTING
Not all typed content may need to be printed. Therefore to print a specific area, you need to set the
print area.
Defining a print area
1. Select an area you want to print
2. Select Print Area on the Page Layout tab in the Page Setup group.
3. Click Set Print Area.
4. Once you have set print area and then, unselect the area you highlighted by clicking anywhere in the
spreadsheet. You will notice some dotted lines or solid lines around the new print area.
Setting up printing margins
You can adjust the print area by adjusting the printing margins. This is done by viewing your workbook in
Page Break Preview.
Procedure
1. Click Page Break Preview on the View tab in the Workbook Views. The print area now appears with
blue margin. Only this area will be printed. The page break preview also shows the number of pages
that will be printed.
2. Select the blue line using your mouse and then drag it until the whole area to be printed is inside the
blue margin.
3. Click Normal on the View tab in the Workbook Views group to exit the page Break Preview. Once
you do that a dotted line around the new printed area appears.
SETTING A HEADER AND FOOTER
A header and footer are pieces of text that appears automatically at the top and bottom of each page
respectively.
Text on header and footer can be tittle, page number or date.
a. Setting a header or footer
1. Select Source Data worksheet.
2. On the Insert tab click Header & Footer in the Text group. Excel will take you to the Page
Layout view.
3. To add a header or footer, click the left, center or right header or footer text box at top or the
bottom of the worksheet.
4. Type your header or footer text such as your name or examination number.
b. Add a predefined header or footer to a worksheet
1. Click the worksheet to which you want to add a predefined header or footer.
2. Click Header & Footer on the Insert tab in the Text group.
3. Click the left, center or right header or footer text box at top or the bottom of the worksheet page.
4. Click Header or Footer on the Design tab in the Header & Footer group and then, click the
predefined header or footer you want.
c. Changing header and footer options for a worksheet.
1. Click the worksheet for which you want to choose header and footer options.
2. Click Header & Footer on the Insert tab in the Text group.
3. Click the left, center or right header or footer text box at top or the bottom of the worksheet page.
4. On the Design tab in the Options group, select one or more of the following:
i. To specify that the headers and footers on odd-numbered pages should be different from
those on even –numbered pages, select the Different Odd & Even Pages check box.
ii. To remove headers and footers from the first printed page, select Different First Page
check box.
iii. To specify whether the headers and footers should use the same size and scaling as the
worksheet, select, Scale with Document check box.
d. Inserting specific header and footer elements for a chart
1. Select the chart using the mouse
2. On the Insert tab click Header & Footer in the Text group. The Page Setup dialog box appears as
below
3. Click Custom Header or Custom Footer. The Header or Footer dialog box appears as below:
4. Type the left, center or right Header or Footer depending on what you want and then click OK.
5. You can preview the header or footer you have inserted by:
i. Select Print on the File tab.
ii. Choosing Print Preview.
SETTING PAGE ORIENTATION
Orientation refers to the position or direction in which the page of a spreadsheet or other software lies.
A spreadsheet page can Portrait or Landscape
Procedure
1. Select the source data worksheet
2. Click Orientation on the Page Layout tab in the Page Setup group. A drop down menu displaying
Portrait and Landscape appears, (by default it is in Portrait).
3. Click Landscape.
4. Click File and then Print Preview to view your page Print Preview mode.
IMPORTING DATA INTO A SPREASHEET
Importing is the transferring of data from one computer program to another.
Data format is changed during importing process.
For example, you can use Microsoft Excel to import data from text file into worksheet.
Procedure
1. Launch Microsoft Excel
2. Choose From Access for example on the Data tab in the Get External Data group. The select Data
Source dialog box appears.
3. Locate and select the Microsoft Access File or any other file you want to import and follow further
instructions.
LINKING FILES
A Link is formula that gets data from a cell in another workbook.
When you open a workbook that contains links (a linking workbook), Microsoft Excel reads in the
latest data from the Source Workbook (s) (update the links).
When you create a link, Excel creates a formula that includes the name of the source workbook in
square brackets [ ], followed by the worksheet name, an exclamation point, and the cell reference.
Procedure for linking files
1. Create your workbook to be as your source workbook.
2. Create another workbook which will be your linking workbook.
3. Select the range of cells in the source workbook which you want to be linked in the linking workbook.
4. Click Copy button on the Home tab in the clipboard group.
5. Switch to the destination or linking workbook and right-click in the cell where you want to want the
link.
6. Click Paste Special. The Paste Special dialog box appears.
7. Click Paste Link on the dialog box. The data will be pasted.
8. You can format the data in the linking worksheet so that it appears very pleasant to your eyes.