ICT122 Manual 2023
ICT122 Manual 2023
2023
ICT122 Practical
Manual 2022
Presentation, Spreadsheet, and Database Basics
using Microsoft Office 2019
Source: https://www.northernpodiatry.com.au/blog/2018/04/15/workplace-posture-and-the-effects-on-your-body/
PowerPoint presentations can amplify your message, accelerate the information being absorbed
and assist with comprehension enabling faster decision making.
OBJECTIVES
• Creating Slides
• Making Changes to Presentation
• Adding Images and Charts
• Adding Motion
INTRODUCTION
Here are some useful terms in PowerPoint that you must know:
Presentation File: The file you save that contains all the slides, speaker’s notes, handouts, etc, that
make up your presentation.
Object: Any element that appears on a PowerPoint slide, such as clip art, text, drawings, charts,
sounds, and video clips. You can refer to a clip art object, a text object, a title object, a drawing
object, etc. Anything you put on a PowerPoint Slide is called an object.
Slide Show: A series of slides displayed in sequence. A slide show can be controlled manually or
automatically.
Transition: A special effect used to introduce a slide during a slide show. For example, you can
fade in from black, or dissolve from one slide to another.
The Design Ribbon toolbar (Figure below) contains several categories for formatting the design
and elements of your presentation. These include Home, Insert, Design, Transitions, Animations,
Slide Show, Review and View. These icons are convenient but will not bring up dialogue boxes
that allow you to change the settings of these actions. You should use whichever method works
the best for you.
1. The Home tab – allows a user to edit Slides, Fonts, Paragraph, Drawing and Editing.
2. The Insert tab – allows a user to add Tables, Images, Illustrations, Links, WordArt, and Media
Clips.
3. The Design tab – allows a user to edit how the presentation will look. It includes features such
as Page Setup, Themes, and Background Styles.
4. The Transitions tab – allows a user edit Slide Transitions, Effects, and Transition Timing.
5. The Animations tab – allows a user to add custom animations to the presentation by choosing
from Preview, Animations, Advance Animation, and Animation timing.
6. The Slide Show tab – allows a user to select how the presentation will be displayed by choosing
Start your Slide Show, Set Up your Slide Show, and Adjust Monitor Settings.
7. The Review tab – allows a user to Proofread, Translate Languages, Comment Slides, and
Compare the presentation.
8. The View tab – allows a user to set the View of your Presentation, Create Master
Views,Show/Hide Features, Zoom, Switch from Color to Grayscale, Adjust Windows, and Add
Macros.
CREATING SLIDES
1. In the next step you will create a Title Slide for your presentation using a Blank Presentation
option. You will be working in Slide View.
2. Open the PowerPoint program. PowerPoint dialog box appears.
On the Slides Pane, right click where you want the new slide to be
located and choose New Slide
OR
On the Slides Pane, click where you want the new slide to be located
and then press Enter key.
OR
On the Slides Pane, click where you want the new slide to be located
and the in the Slides group under Home tab, click on New Slide button.
Let’s say you created several slides for your presentation. You’ve finished working on the last slide,
and now you want to take a look at your other slides. Here’s how you move from slide to slide in
Slide View.
To move to a previous slide click the upper double-arrow button on the lower right corner of
the PowerPoint window. The previous slide will appear.
You can also click on the slide you want. Or just use the up and down arrow keys to move up and
down your slides.
In Slide View, you can also move from slide to slide using the Page Up and Page Down keys on your
keyboard.
Outline View
NB: When you right click on Outline pane, you will see a menu with useful tools for working in
this view
You can add a new slide in Outline View the same way you do in Slide View.
You can also add new slides quickly by using the Enter key. To add a new slide, right click after a
slide title and choose new slide.
OR
If you want to add text to a slide that you created previously, place an insertion point in the outline
and start typing.
If you want to add text to a new slide you’ve created in Outline View, follow these steps:
When you are in Outline View, you will see all the text that appears on your slides. However,
PowerPoint lets you collapse the view, so you see only the outline titles. Use this option if you
want to print an outline of your presentation, or if you want to check the logical flow of your slides
without the distraction of extra text.
1. Right click on the Slides pane, and choose the Collapse All button. The slide text for all the
slides will disappear.
1. Right click on the Slides pane, and choose the Expand All button. The text for all the slides
will appear again.
This button makes the hidden text appear again.
Other than the View tab of the Ribbon, you can also access most of these views by clicking the
four small buttons towards the right side of the Status Bar.
To move from one slide to another in Outline View, click anywhere on the slide you want to move
to. You can also move from slide to slide using the up and down arrow keys on your keyboard.
WHAT IS A TEMPLATE/DESIGN?
The default slide design for PowerPoint documents is a blank slide. Therefore, if you want your
slides to have a specific design, you must add one. A template is also called a presentation design;
it lets you create a presentation without worrying about design elements.
The template defines the colour, background, and font of the slides. PowerPoint has many
templates, which you can preview and select in the New Presentation dialog box. You can also use
the Design tab from the User Ribbon, and then To change the theme of your presentation, click
on the theme that you like and it will automatically apply to your slide.
PowerPoint also lets you customise the template. For instance, you can change the background
colour or typeface of a template.
If you don’t like where a text box is positioned on a page, you can move it to a new location. First
you select it, and then you move it.
1. Click the text box you want to move. A thick gray border will appear around the text box.
2. Place the pointer on the border. The pointer will change into a four-headed arrow.
3. Hold down the mouse button and drag the box to the new location.
4. Release the mouse button.
The gray border that appears around an object when you select it has square handles on its corners
and on its sides. These are called selection or resizing handles. You can click and drag these handles
to resize text boxes.
1. Click the text box to select it. A gray border will appear around the text box.
2. Place the pointer on a resizing handle. The pointer will change into a two-headed arrow.
3. Hold down the mouse button and drag the resizing handle until the box is the size you
want. Drag outwards to make the box larger. Drag inwards to make the box smaller.
Sometimes you may want to add text to a slide without using a built-in text box. For example, you
may want to type a label for a drawing, or you may want to add text to a blank slide layout. In
PowerPoint, you can add your own text boxes to any slide using the Text Box tool.
1. On the Text menu from Insert tab, click the Text Box button. The pointer will change to a cross.
2. Click on the slide where you want to place the text. A small text box will appear.
3. Type a word in the text box. As you type, the box will expand to fit the text.
4. After you finish typing, click outside the text box. The border around the box will disappear.
You can delete your text boxes using the Delete key on your keyboard.
1. Click the text box to select it. A gray border will appear around the text box.
2. Click the box’s border. The insertion point will disappear from the text box.
3. Press the Delete key on the keyboard. The text and the border both disappear. The entire
text box is deleted.
If you want to delete a built-in text box (one that came with the original slide), you need to add
one additional step.
1. Click the text box to select it. A border will appear around
the text box.
2. Select Shape Format in the tab, then click the Shape Styles
launcher and from the Format Shape dialog box choose Line
Color button, then choose the Solid line.
3. Choose any colour of your choice.
4. Try to see what the Line Style button and nay of the
available fills.
5. Select outside the text box to deselect it.
Changing Font
In PowerPoint it’s easy to change the background colour of the slide you are working on. Let us
say you want to change the colour of the slide to light blue. Here is what to do:
1. In the Customize group under the Design tab, click on Format Background. The Format
Background dialog box will appear.
2. Choose Solid fill on the right pane.
3. Click on the Color list box and choose any colour of your choice. If the colour you want is
not shown, click on More Colors to open the Colors dialog box and choose the colour you
want.
4. If you like what you see, click the Close button. The background colour of the slide is now
light blue.
5. If you want the background colour to apply for all the slides, click the Apply to All button.
This will show you how to add shapes, images and charts to a presentation. Get ready for some
“zing”!
Adding a Shape
PowerPoint lets you add a variety of shapes to the slides of your presentation.
Try adding a start shape to your slide, using the AutoShape tool on the Drawing
group.
1. Click on the 5-point star shape, in the Drawing group under Home
tab. The pointer will change into a cross.
Moving a Shape
1. Place the pointer on the star. The pointer turns into a four-headed arrow.
2. Click and hold down the mouse button, then drag the star to the new location.
3. When the star is positioned where you want it, release the mouse button.
Class Exercise:
Insert a screenshot/picture from the web and try to change the background colour etc.
Sometimes you may end up with images overlapping each other on a slide. Let
us say you’ve created a design where three different coloured squares are
layered on top of each other: a blue square at the back, a yellow square in the
middle, and an orange square in front.
You want to send the orange square to the back layer. How do
you get it there?
Adding a chart
Charts are used to create diagrams in MS PowerPoint. To add a chart to any slide, click the Chart
button in the Illustrations group under Insert tab.
When you insert a chart, a sample data sheet and corresponding bar chart will appear on your
slide. PowerPoint has included some sample data in the first four columns. The bars in a chart are
graphical representation of the numbers in the data sheet. Notice how a higher number in the
data sheet results in a taller corresponding bar.
To create your own chart, you can replace the data in the sample data sheet with your own. Try
adding a number to the chart to see how it changes the corresponding bar on the chart.
After you’ve finished entering the data, exit the work window by closing the data sheet. If you
need to make any revisions to the chart data, right click on the Chart and choose Edit data (or click
on Edit data button in the Data group under Design).
Adding a table
You can add a table to a slide using the Insert tab. Let us try adding a table to your slide.
1. Click on the Table arrow in the Tables group under Insert tab.
2. In the drop-down box, click and drag the pointer across the number of rows and columns
you want for your table. For example, three rows and three columns.
3. Release the mouse button. The table work window will appear. The work window is where
you enter and edit information, and where you format the table.
ADDING MOTION
When you go to Slide Sorter View, you see miniatures of all the slides in the presentation,
complete with text and graphics. This view is useful for rearranging slides, and for adding
transitions to slides.
1. Click the Slide Sorter View button in the lower left corner of the PowerPoint window.
2. Click the View tab and choose Slide Sorter under Presentation Views group.
The Slide Sorter View is the easiest place to rearrange the order of your slides.
Let us say you have four slides in your presentation, and you decide that Slide 2 should really
appear after Slide 3. Here is what you do to move the slides around:
Adding a Transition
1. Select the Slide Sorter in the View tab and click the slide you want to add the transition to.
2. Click the Transitions tab, and then under the Transition to This Slide group choose the
transition style you like. There are more transitions selection by clicking the arrow pointing
down.
3. In the Effects Options list box, choose the direction you prefer.
4. Under the Timing group, you can choose the sound that will play during the transition
between the previous slide and the current slide, how long a transmission should take and
whether you time your slides or move them through the click of the mouse.
NB: You can preview the transition effect you applied by clicking on Preview in the Preview group
still in the Transitions tab. If you want the same transition to apply to all the slides in your
presentation, click the Apply to All button in the Timing group.
Timing a Transition
If you want you slide show to run automatically, you must add timing to slides. When you add
timing to a slide, you specify the number of seconds to remain on each slide.
2. Click the Transition tab, and then under Advance Slide in the Timing group uncheck the box
next to On Mouse Click and check the box before After.
3. In the seconds’ box, type the number of seconds to remain on the slide. For example, 5
seconds.
When you run your slide show, the slide that you applied the timing to will only remain on the
screen for five minutes.
When you animate an object, you add special visual or sound effects to it.
1. Click on the object you want to animate, e.g., the title of your presentation, to select it.
2. Click on the Animation tab, and then under Animation group choose the animation style
you like, e.g., Split.
Class Exercise:
Try Special Effects under Animation and see how they work. Also, try stuff that is under Advanced
Animation and Timing groups.
When you give your presentation, you may need to refer to notes to elaborate on a slide’s
material, or to remind you to mention some detail. In PowerPoint, you can write your speaker’s
notes while you work on your slides. Simply write your notes for the slide in the text box provided.
Once you’ve written these notes, they can only be seen in the Note Page View. They will not be
displayed during the Slide Show.
NB: In Normal View, you can also write your notes in the Notes window at the bottom of a slide.
When you select Rehearse Timings, your Slide Show starts running, and PowerPoint will start
timing it. The timing is displayed in the Rehearsal dialog box. When the Slide Show comes to an
end, PowerPoint will give you the final running time.
NB: You Click No because you are only timing the show. You would click Yes if you wanted to use
the recorded timings to automate your presentation.
PRINTING SLIDES
This can only be done when a printer is connected. Try to do this at your own time.
To print your slides, click on the File tab on Design toolbar, then the Print command.
1. When you select the Print command, you will notice all of your printing options including a
preview of your document are right at your fingertips.
2. Select your Print options and click on the Print command.
Print Preview
When you select the Print command under the File tab, your document will automatically appear
in as a preview of what will print. If you change your print options, the preview will change
accordingly. To view each page, click on the left or right arrows next to the page number in the
box and the bottom middle section of your screen.
Print Layout
You can select how you would like your slides to be printed by selecting the drop-down arrow next
to the Fill Page Slides command.
Then, click on the format would like your slides to print in. The different options are:
Once you select your printing format, a preview of your slides will appear. When you are ready to
print, click the Print command.
NOTE: If you would like to print slides that also include lines for audience notes you need to select
Handouts (3 Slides Per Page).
OBJECTIVES
• Spreadsheet Editing
➢ Entering Data
➢ Moving Cell Contents
➢ Inserting Rows and Columns
➢ Deleting Rows and Columns
➢ Moving Cells
INTRODUCTION
Excel is a member of the spreadsheet family of software. Excel can be used to create and format
workbooks (a collection of spreadsheets) to analyse data and make more informed business
decisions.
Click the Start button, and select Excel, then click Blank workbook. The program window opens
with a new blank workbook. The default new workbook in Excel has one worksheet, you can add
more worksheets or delete existing worksheets as needed.
The Excel program window is easy to navigate and simple to use for the main elements of the
program window. It is designed to help you quickly find the commands that you need to
complete a task.
Excel consists of 16 384 columns and 1 048 576 rows. Each spreadsheet location where data is
entered is called a cell. A cell is identified as the intersection of a column and a row. A1 refers
to the cell located at the intersection of column A and row 1.
Element Description
Title Bar Displays the name of the workbook and the program.
Minimize, Restore Used to control the program window. Use the Minimize button
Down/Maximize, and to hide the window. Use the Restore Down/Maximize button to
Close buttons adjust the size of the window. Use the Close button to exit Excel.
EXCEL RIBBON
The Ribbon contains multiple tabs, each with several groups of commands. You can add your own
tabs that contain your favorite commands. Certain programs, such as Adobe Acrobat Reader, may
install additional tabs to the ribbon. These tabs are called Add-ins.
You can customize the Ribbon by creating your own tabs with whichever commands you want.
Commands are always housed within a group, and you can create as many groups as you want to
keep your tab organized. If you want, you can even add commands to any of the default tabs, if
you create a custom group in the tab.
Right-click the Ribbon and select Customize the Ribbon... from the drop-down menu.
1. Click New Tab. A new tab will be created with a new group inside it.
2. Make sure the new group is selected.
3. Select a command from the list on the left, then click Add. You can also drag commands
directly into a group.
4. When you are done adding commands, click OK.
If you do not see the command you want, click on the Choose commands drop-down box and
select All Commands.
The Ribbon is designed to be responsive to your current task and easy to use, but if you find it is
taking up too much of your screen space, you can minimize it.
1. Click the arrow in the upper-right corner of the Ribbon to minimize it.
2. Select the desired minimizing option from the drop-down menu: Auto-hide Ribbon: Auto-hide
displays your workbook in full-screen mode and completely hides the Ribbon. To show the
Ribbon, click the Expand Ribbon command at the top of screen.
3. Show Tabs: This option hides all command groups when they are not in use, but tabs will
remain visible. To show the Ribbon, simply click a tab.
4. Create a folder on the desktop and call it Practical 2.
5. Open the Practical 2 folder and create an Excel file named Practical 2 – Exercise
Opening a Workbook/File
To do this Press
Close a workbook Ctrl+W
COMPATIBILITY MODE
Sometimes, you may need to work with workbooks that were created in earlier versions of
Microsoft Excel, such as Excel 2003 or Excel 2000. When you open these kinds of workbooks, they
will appear in Compatibility mode. Compatibility mode disables certain features, so you will only
be able to access commands found in the program used to create the workbook. For example, if
you open a workbook created in Excel 2003, you can only use tabs and commands found in Excel
2003.
To exit Compatibility mode, you will need to convert the workbook to the current version type.
However, if you are collaborating with others who only have access to an earlier version of Excel,
it's best to leave the workbook in Compatibility mode so that the format will not change.
To Convert a Workbook:
If you want access all the Excel features, you can convert the workbook to the current Excel file
format.
Note that converting a file may cause some changes to the original layout of the workbook.
1. Download a workbook called Sales Data from ICT122 Eduhub Page, Week 3 into the
Practical 2 folder and put it in the folder you created in desktop.
2. Open the file you copied in step 1.
3. Click the File tab to access Backstage view and select Info and Click Check for Issues.
4. Select Check Combability command and select Excel 2016 and 2019 only
5. Deselect Check Combability and Click OK when saving this workbook
6. Then Click Save, the dialog box will appear. Select the location where you wish to save the
workbook, enter a file name for the presentation, and click Save.
7. The workbook will be converted to the newest file type.
8. Close the workbook.
ENTERING DATA
Entering Text
You can insert text in a worksheet to serve as labels for values, heading for columns or instructions
about the worksheet. Text automatically aligns to the left in a cell.
Entering Numbers
Numeric entries contain only numbers and are automatically aligned to the right in a cell. If you
precede a number with a minus sign or enclose it in parentheses Excel considers it to be a negative
number.
Excel Worksheet
Note: IF you enter text that is longer than column’s current width, the excess characters will
appear in the next cell to the right, if the cell is empty. If the adjacent cell is not empty the
1. Position your mouse over the column line in the column heading so that the white cross
becomes a double arrow .
2. Click and drag the column to the right to increase the column width or to the left to
decrease the column width.
3. Release the mouse. The column width will be changed in your spreadsheet.
1. Position the cursor over the row line so that the white cross becomes a double arrow
. Positioning the mouse over the row line
2. Click and drag the row downward to increase the row height or upward decrease the row
height. Increasing the row height
3. Release the mouse. The height of each selected row will be changed in your worksheet.
Increased row height
Although the number of rows and columns in a worksheet is fixed, you can still insert rows and
columns if you need to make room for additional data or delete rows and columns if the data they
contain is no longer needed.
NOTE: these operations do not change the total number of rows and columns. The Cell group on
the Home tab contains commands that can be used to easily insert, delete, or format rows and
columns.
You must select rows and columns to perform operations, such as applying the same format to
the entire row or column, changing the height of more than one row or the width of more than
one column at a time, and inserting or deleting rows and columns. When a row or column is
selected, every cell in the row or column is highlighted, except for the active cell.
Drag across the row or column headers. Or click the header of the first row or column you want
to select, hold down the Shift key, and then click the header of the last row or column you want
to select.
Hold down the Ctrl key, and then click the headers of the rows and columns you want to select.
You can insert rows and columns into an existing worksheet to add additional data. Rows are
added above the current or select row.
1. Select any cell in the row that you want to insert a row above,
2. On the Home tab,
3. In the Cells menu, select Insert
4. Select Insert Sheet Rows
Inserting Columns
1. Select any cell in the column that you want to insert a column on its left,
2. On the Home tab,
3. In the Cells menu, Select Insert
NOTE: If you select multiple rows or columns, Excel insets the same number of rows and columns
into the worksheet.
You can easily delete unwanted rows and columns from a worksheet. Before deleting a row or
column, you should make sure it does not contain data that you want to keep.
NOTE: You can also right-click the row header and select Delete
FILL HANDLE
The fill handle is a small black dot or square in the bottom right corner of the active cell. The fill
handle can be used either to copy a cell’s contents to adjacent cells or to create a series. If Excel
recognizes the cell contents as part of a series, it will Auto Fill other selected cells with the next
items in the series. Use the fill handle by clicking on it with the mouse pointer to drag select
adjacent cells.
1. Select the cell or cells containing the content you want to use. You can fill cell content either
vertically or horizontally.
2. Position your mouse over the fill handle so that the white cross becomes a black cross
3. Click and drag the fill handle until all the cells you want to fill are highlighted.
4. Release the mouse, and your cells will be filled.
For example, if you need to continue a sequence, just enter the first two values into the starting
cell and grab the fill handle to copy the data across the specified range.
Filled cells
1. Select any cell in the row that you want to insert a row above,
2. On the Home tab,
3. In the Cells menu, Select Insert.
4. The Select Insert Sheet Rows
Inserting Columns
1. Select any cell in the column that you want to insert a column on its left,
2. On the Home tab,
3. In the Cells menu, Select Insert.
4. The choose Insert Sheet Columns
CONTROLLING SPREADSHEETS
Find, Replace, Go To
Excel can search a spreadsheet and find specific entries, it can also replace those entries it finds
with something else. In a large worksheet you can locate specific items (labels, values) or cell
references by using the Find Command.
1. Under Home tab, on the Editing menu, choose Find & Select.
2. From the menu that appears choose Find.
3. Type whatever you want to find in the provided box.
4. Click OK.
To change data values or formulae you can use the Replace Command.
1. Under Home tab, on the Editing menu, choose Find & Select.
2. From the menu that appears choose Replace.
3. Type in whatever you want to modify together with its replacement in the appropriate boxes.
4. Click OK.
5. To jump to any cell on the worksheet you use the Go To command.
1. Under Home tab, on the Editing menu, choose Find & Select.
2. From the menu that appears choose Go To.
3. Type in the desired cell address in the Reference box.
4. Click OK.
Press “Ctrl” and “F” on the keyboard at the same time, the
pop up menu for the find and replace tool will appear.
1. Using the Sales Data1 file downloaded from the ICT122 Eduhub Page, do the following:
i. Find and Replace, replace the word “Rail Park” with “Lobatse”
ii. Find and replace the word “broudhurst” with “Broadhurst”
iii. Find and replace the “gwest” with “Gwest”
iv. Go To December Sales
v. Go To July Sales
To Hide
To Unhide
1. Select the two rows or columns that border the hidden row(s) or column(s).
2. Under Home tab, on the Cells menu, choose Format.
3. From the resultant menu choose Hide & Unhide under Visibility.
4. Then choose either Unhide Rows or Unhide Columns, depending on what you want to unhide.
To Hide
To Unhide
Note: Although you can hide multiple sheets at once, you can only unhide one sheet at a time.
When you merge two or more adjacent horizontal or vertical cells the cells become one larger cell
that is displayed across multiple columns or rows. When you merge multiple cells, the contents of
only one cell appear in the merged cell. This is very useful especially when making heading for
tables,.
Merge Cells
To merge cells only, click the arrow next to Merge and Center, and then click Merge Across or
Merge Cells.
Note: If both cells have text in them, Excel will delete the text from the right-hand or bottom
cell (depending on the direction of the merger) and only keep that in the left-hand or top-
cell. Merge only empty cells to avoid confusion; if necessary cut and paste text to other
cell(s), merge the originals ones and then cut and paste the text back.
Split Cells
1. Select the merged cell you want to split. To split the merged cell, click Merge and Center.
The cells will split and the contents of the merged cell will appear in the upper-left cell of the
range of split cells.
Wrapping Text
When the text exceeds column width, it is possible to automatically have the text create a new
line at the column with (“wrap” the text).
To do so:
1. Select the cell or range of cells you wish to enable wrapping for.
2. Locate the Alignment area of the Home ribbon.
3. Click Wrap Text button.
On the Home tab, in the Cells group, click Format, and then under Cell Size click AutoFit
Row
Freezing Panes
Freezing panes allows you to select data that remains visible when scrolling in a sheet. For
example, keeping row and column labels visible as you scroll.
To keep an area of a worksheet visible while you scroll to another area of the worksheet, you can
either lock specific rows or columns in one area by freezing panes.
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. A solid line indicates that the row is frozen to keep column labels in place when
you scroll.
When you split panes, Excel creates either two or four separate worksheet areas that you can
scroll within, while rows or columns in the non-scrolled area remain visible. This worksheet has
been split into four areas. Notice that each area contains a separate view of the same data.
Splitting panes is useful when you want to see different parts of a large spreadsheet at the same
time.
NOTE: YOU CANNOT DO BOTH THE SPLIT PANES AND FREEZE PANES AT THE
SAME.
Freeze Panes
1. On the worksheet, select the row or column that you want to keep visible when you scroll.
2. On the View tab, in the Window group, click the arrow below Freeze Panes.
3. Then do one of the following:
i. To lock one row only, click Freeze Top Row.
ii. To lock one column only, click Freeze First Column.
iii. To lock more than one row or column, or to lock both rows and columns at the
same time, click Freeze Panes.
Unfreeze Panes
1. On the View tab, in the Window group, click the arrow below Freeze Panes.
2. Click Unfreeze Panes.
Split Panes
1. To split panes, point to the split box at the top of the vertical scroll bar or at the right end of
the horizontal scroll bar.
2. When the pointer changes to a split pointer or, drag the split box down or to the left to the
position that you want.
3. To remove the split, double-click any part of the split bar that divides the panes.
Data from a protected worksheet cells can be accessed but not overwritten.
1. When you protect a worksheet, all cells are locked by default, which means that they cannot
be edited.
2. To enable cells to be edited while leaving only some cells locked, you can unlock all the cells
and then lock only specific cells and ranges before you protect the worksheet.
3. You can also enable specific users to edit specific ranges in a protected worksheet.
DATA VALIDATION
With Excel's data validation tools, you can control how users input data into workbooks and ensure
data is entered consistently and accurately. You can control the dates, the times, even the length
of the text they enter, or simply provide a list of acceptable choices to eliminate any possible
mistakes.
If you share one sheet to use with lots of people, you might want
to use this feature to validate data entry.
This approach will be useful, for example, when you enter identity numbers, or in such cases
where the user must enter a fixed number of characters. Excel reports error if the entry gets longer
or shorter.
If you will use the date function =TODAY() so the procedure will cause the user will be able to
enter only the current date.
If the cells are filled with consecutive dates with any of the options Copy-Paste data validation
rules will not work! Validation works only for the data entered from the keyboard!
Drop-down List
If you are completing the data sheet enter same information (e.g., days of the week, months) you
can use a drop-down list to validate.
First, prepare list of all possible options. In this example, these are the days of the week. Then on
the Settings tab, select the Source list and select cell address.
To get the selected cell could only enter text (no numbers), use the following formula:
=ISTEXT(A1)
Acceptance of Value Only if it is Greater Than the Value in the Previous Cell
The following formula for verifying the accuracy of the data allows the user to enter the cell only
a value that is greater than the value contained in the cell located directly above it:
1. Download Data Validation Files (instruction PDF file and Excel file) from the ICT122 Eduhub
Page.
MAKE SURE YOU HAVE COMPLETED THE ABOVE CLASS EXERCISE 2 HAS
BEEN CHECKED BY THE INSTRUCTOR BEFORE MOVING TO THE NEXT
PART OF THE LAB.
Right click on the Sheet tab and select Rename from the menu list.
The Header & Footer Tools options related to the header and
footer sections of a workbook.
FORMATTING SPREADSHEETS
To further enhance a 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.
In Excel, the format of a cell is separate from the data that is stored in the
cell. 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.
1. Click the cell(s) that contains the numbers that you want to format.
On the Home tab, in the Number group, click the arrow next to the
Number Format box, and then click the format that you want. If you
are unable to format numbers in the detail you would like that you
can click on the More Number Formats at the bottom of the Number
Format drop down list.
2. In the Category list, click the format that you want to use,
and then adjust settings of the Format Cells dialog box. For
example, if you are using the Currency format, you can
select a different currency symbol, show more or fewer
decimal places, or change the way negative numbers are
display.
Cell Borders
NOTE: 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, you can display the
gridlines.
1. On a worksheet, select the cell or range of cells that you want to add a border to, change the
border style on, or remove a border from.
2. Go to the Home tab, in the Font group.
3. Click the arrow next to Borders.
4. Click on the border style you would like.
5. The border will be applied to the cell or cell range.
NOTE: To apply a custom border style, click More Borders. In the Format Cells dialog box, on the
Border tab, under Line and Color, click the line style and color that you want.
NOTES: The Borders button displays the most recently used border style. You can click the
Borders button (not the arrow) to apply that style.
Cell Styles
You can create a cell style that includes a custom border, colours, and accounting formatting.
1. On the Home tab, in the Styles group, click Cell Styles.
2. Select the different cell style option you would like applied to your spreadsheet.
NOTE: If you would like to apply a cell fill and a cell border, select the cell fill colour
first ensure that both formats are applied.
This exercise is designed to help you apply the information learnt from this and the previous
practical sessions.
Remember to save your work often. Select a new worksheet before beginning the exercise.
Do this the following exercise in Sheet4 and name it Sure Balance Checkbook.
1. Enter the text below in the cells indicated.
2. Modify column widths for columns A through F. Instead of selecting the best fit option,
precisely indicate the column width desired. Follow the steps below.
a. Open the FORMAT menu, Select the COLUMN option, Select the WIDTH option.
b. Type the desired number of columns in the box labeled “Column Width"
c. (e.g., 5). Click on <OK>.
Column A: 5; Column B: 8; Column C: 30; Column D: 10; Column E: 10; Column F: 1;Column
G: 12
4. Format the numbers to show dollars and cents for all entries in columns D, E, and G. Follow
the steps below.
a. Click on the letter at the top of the column to be formatted. (The entire column
should turn dark.)
b. Open the FORMAT menu.
c. Select the CELLS option.
d. The NUMBER option automatically should be selected (if not, click on the tab
labelled NUMBER).
e. Under the Category label, select the option CURRENCY.
f. Under the Format Codes label, select the format -$1,234.10 which is the third
choice.
5. Format column B to enter the date of transactions. Follow the steps above but select the DATE
as the category option and M/D/YY as the format codes option which is the first choice.
6. Enter the formulas below in the cells indicated. G4: =-D4+E4 : G5: =G4-D5+E5
7. Enter the information below in the rows indicated.
MAKE SURE YOU HAVE COMPLETED THE ABOVE CLASS EXERCISES 3 AND
4 AND HAVE BEEN CHECKED BY THE INSTRUCTOR BEFORE MOVING TO
THE NEXT PART OF THE LAB.
More often than not when we create a are referring to the content of cell A1 only,
formula using one of Excels built-in functions while in the second example we would be
we will be referring it to a cell or range of referring to the contents of cells A1, A2, A3,
cells. An example of a single cell reference A4, A5, A6, A7, A8, A9, A10. Using the
would be A1. reference A1:A10 is just a simple method
that Excel will automatically recognise. If we
For you to complete this next exercise, click use the reference A1:C5 we are telling Excel
+ next to sheet1 to create sheet2 to refer to the contents of cells A1, A2, A3,
A4, A5, B1, B2, B3, B4, B5, C1, C2, C3 C4, C5.
An example of a range of cells reference
would be A1:A10. For the first example we
CALCULATIONS
A formula begins with an equal sign (=). A formula is normally typed in the Formula Bar.
Formula Bar
It can also be typed in the active cell and the whole formula will be displayed in the formula bar.
Any part of the formula in brackets will be calculated first. Indices will be next. Multiplication and
division will be next. Addition and subtraction will be calculated last.
Creation of a formula can be made easier by using the mouse to create cell references. Still using
Practice Exercises 1 workbook to do the following exercises.
You can include or reference other cells in a formula. When you do, the result of the formula
depends on the values in the referenced cells and changes automatically when the values in the
referenced cells change. This is extremely powerful in what-if scenarios.
To see how this works, select worksheet Practice Exercises 2 and enter 10 in cell A1. Now select
cell A2 and type =A1*2, and press ENTER. The value in cell A2 is 20. If you change the value in cell
A1 from 10 to any value, the value in cell A2 will also change. Cell references are especially helpful
when you create complex formulas, or conduct what-if analysis.
Enter the following information into Practice Exercises 2 worksheet (ignore any formatting) in
columns A, B, and C, and in rows 1 through 6. Then calculate the Total Cost for the Semester 1
using a formula to add up the individual Costs (Tuition, Housing, etc.).
The most logical solution would be to type the formula ’=B2+B3+B4+B5’ into cell B6. You can also
enter formulae by using the point mode, where you either click on a cell with your left mouse
button or you use the arrow keys. To enter ‘=B2+B3+B4+B5’ into cell B6 using the point:
You’ll notice that the calculation executes immediately after the formula is typed into the cell and
entered by pressing either the Enter or Tab key or by clicking the check mark in the formula bar.
The result of the calculation is displayed in the cell (i.e., in B6). The formula itself is now visible in
the formula bar.
Automatic Calculation
Let us make a change to the Costs for Semester 1 and Semester 2 spreadsheet and note how Excel
automatically recalculates the formulas and functions we have already entered.
To reiterate the use of cell addresses in formulae and functions, imagine we had constructed our
formulae and functions by typing the actual numbers contained in the cells instead of the cell
addresses. That is, to calculate the Total Cost for semester 1 we had entered the formula
’=10000+5000+1000+1500’.
What would happen if we changed the amount entered in cell C2 from ’10000’ to ’15000’ as
suggested above?
Obviously, our calculation defined by our formula would not automatically change, and we would
have to edit the formula by hand. Imagine if the cell we modified was referenced by ten separate
formulae or functions. That would be a lot of editing. If automatic calculation is activated, Excel
automatically recalculates the result.
NB: You can check to make sure automatic calculation is turned on:
1. The first cell reference is B3, the color is blue, and the cell range has a blue border with square
corners.
2. The second cell reference is C3, the color is green, and the cell range has a green border with
square corners. Save and close the workbook.
You can drag the border of the cell selection to move the selection or drag the corner of the border
to expand the selection.
In Excel there are three types of cell references, these are Relative, Absolute and Mixed.
Each cell on an Excel worksheet has its own unique address; e. g. A1 is the relative address of the
first cell on all worksheets, while XFD1048576 is the relative address of the last cell on all
Worksheets. The reason why they are called relative is because they are relative to the cell they
are used in. This will be best explained by a simple example.
Let us now copy the content of cell B1 and paste it into cell D1, this time we should get the result
0 (zero). If you click in cell D1 and look in the Formula bar you will see the relative cell reference:
=C1. The reason we get the result of 0 (zero) is because the value of an empty cell is 0 (zero).
By default, MS Excel uses relative reference. Follow the steps below to practice cell referencing:
1. Open a new workbook and save it as Cell Referencing and rename Sheet1 as Relative
2. Type the information as shown below, the cells that captures Quantity, Price and Amount
should be formatted in Number data type.
(See the formula in cell D2. Cell D2 references (points to) cell B2 and cell C2. Both references are
relative. The formula in D2 is calculating the Amount).
3. Select cell D2, click on the lower right corner of cell D2 and drag it down to cell D5.
(Cell D3 references cell B3 and cell C3. Cell D4 references cell B4 and cell C4. Cell D5 references cell
B5 and cell C5. In other words: each cell references its two neighbors on the left).
In relative reference, you refer to cell that is above or below or left or right to several rows or
columns. For example, if you refer to cell D2 from F2, you are referring to a column that is two
columns to the left of cell D2 and in the same row (the second ‘2’ row). When a formula that
possesses a relative reference is copied from one cell to another cell, the value in the copied cell
also changes. i.e., if you copy a formula =C2+D2 from E2 to the cell F2, the formula in F2 adjusts
in such a way that when the cell F2 is dragged downwards by one row, the formula automatically
changes to =C3+D3 and places the resulting value of =C3+D3 in cell F3.
Let us work with a new data example. Enter the following information into a new worksheet
(ignore any formatting) in columns A, B, and C, and in rows 1 through 5. Then define a formula in
cell D2 to calculate the Cost of the group of Biology Textbooks and copy the formula into cells D3
through D5.
The most logical solution would be to type the formula ‘=B2*C2’ into cell D2. We may also want
to add the column label of Cost into cell D1. We can then use one of the data copying methods to
copy and paste the formula into the desired cells. Compare the formulae in cells D2 through D5
by looking in the Formula bar. You will notice that the formulae are the same except that the row
numbers were automatically changed (from 2 through 5) because of the relative cell referencing.
• Any mistake in a formula will be replicated to all other cells that are copied from the
original formula.
• If a formula is referencing just one cell, it will not stay in that cell once copied to other cells.
• If a change is made to the original formula, it will need to be recopied to all the other cells.
This time you should have the number 1 in cells B1:B10 and if you select any cell in B1:B10 and
look in the Formula bar, they will all have the absolute cell reference =$A$1. This is because by
using the $ (dollar sign) we are telling Excel to always refer to the same cell no matter where we
copy this reference to. The $ in front of the A ($A) is telling Excel to make the column reference
absolute, while the $ in front of the 1 ($1) is telling Excel to make the row reference absolute. So,
the reference in its entirety is what is known as an Absolute cell reference.
In an absolute cell reference, a dollar sign ($) precedes both the column letter and the row
number. You can also have a mixed reference in which the column is absolute, and the row is
relative, or vice versa. To create a mixed reference, you use the dollar sign in front of just the
column letter or row number. Here are some examples:
NOTE: Pressing F4 repeatedly over a reference (cell) will allow you to switch
between making the column, the row, or nothing ‘Absolute. Try it and see!!! Delete
the values in A1 and A2.
Again, the best way to see this is by using a small example. Go to Sheet 2 in the same workbook
and rename the worksheet Absolute Reference 1 and capture information on the figure below:
The reference to cell H13 is fixed (when we drag the formula down and across). As a result, the
correct lengths and widths in inches will be calculated.
The following exercise demonstrates what happens when an absolute cell reference is not used.
1. Create the following table in worksheet named Practice Exercises 2 in columns A through F
and rows 1 through 4 (ignore any formatting).
2. In cell D2, calculate the Total of Trial 1 and Trial 2 for subject A using the SUM function.
3. Use the Autofill feature to copy the function for subjects B and C.
4. In cell E2 enter the formulas ‘=D2*F2’ either by typing or by using the point mode.
5. Use the Autofill feature to copy the formula for subjects B and C.
• NOTE: The results of the formula for subjects B and C are incorrect. This is because
the formula referenced the CONSTANT using a relative cell reference.
6. Edit the formula in cell E2 to reference the CONSTANT using an absolute cell reference:
‘=D2*$F$2’.
7. Use the Autofill feature to copy the correct formula for subjects B and C.
• The 'absolute' part of the formula will not change even if copied elsewhere.
• Just one cell needs to be changed to update all of the cells related with a formula.
• If a range of cells are using a formula which has an absolute cell reference, a change will
affect all cells. You might not want this to happen.
If you grasped this concept, we could move on to what is known as either an:
Try this:
You will have the numbers 1 to 10 in cells B1:B10. This is because the row portion of the reference
(1) is relative. Now copy cell B10 to cell D1 and you should get the result 1. This is because the
column portion of the reference ($A) is absolute. If you click in any cell in the range B1:B10 or D1
and look in the Formula bar you will see that the row portion is always relative to the row the
reference resides in, while the column reference is always absolute.
The same principle also applies to any reference that has an absolute row relative column
reference. Again, this can be best seen via the use of a small example.
Try this:
You will have the number 1 in cells B1:B10. This is because the row portion of the reference ($1)
is absolute. Now copy cell B10 to cell D1 and you should get the result 0, this is because the column
portion of the reference (A) is always relative to the column the reference resides in. If you click
in any cell in the range B1:B10 and look in the Formula bar you will see that the row portion is
always absolute. If you click in cell D1 and look in the Formula bar you should see =C$1.
1. Insert a new worksheet and name it as Mixed Reference 2 and type information below:
2. We want to copy this formula to the other cells quickly. Drag cell F2 across one cell and look
at the formula in cell G2. Please note what is happening, the reference to the price should be
a fixed reference to column B.
3. Solution: place a $ symbol in front of the column letter of cell B2 ($B2) in the formula of cell
F2. In a similar way, when we drag cell F2 down, the reference to the reduction should be a
fixed reference to row 6. Solution: place a $ symbol in front of the row number of cell B6 (B$6)
in the formula of cell F2.
Result:
Note: If we do not place a $ symbol in front of the row number of B2 (this way we allow the
reference to change from B2 (Jeans) to B3 (Shirts) when we drag the formula down). In a similar
way, we don't place a $ symbol in front of the column letter of B6 (this way we allow the reference
to change from B6 (Jan) to C6 (Feb) and D6 (Mar) when we drag the formula across).
4. Now quickly drag this formula to the other cells. The references to column B and row 6 are
fixed.
When calculating data in Excel, you may often find yourself in a situation when you need to pull
data from another worksheet or even from a different Excel file.
You just need to create a link between the worksheets (within the same workbook or in different
workbooks) by using what is called an external cell reference or a link.
An external cell reference in Excel is nothing more than a reference to a cell or a range of cells
outside the current worksheet. The main benefit of using an Excel external reference is that
To reference a cell or range of cells in another worksheet in the same workbook, put the worksheet
name followed by an exclamation mark (!) before the cell address. In other words, in an Excel
reference to another worksheet, you use the following format:
In a real-life formula, which multiplies the value in cell A1 in 'Project Milestones' sheet by 10, an
Excel sheet reference looks like this: ='Project Milestones'!A1*10
When writing a formula that refers to cells in another worksheet, you can of course type that other
sheet name followed by an exclamation point and a cell reference manually, but this would be a
slow and error-prone way.
A better way is point to the cell(s) in another sheet that you want the formula to refer to, and let
Excel take care of the correct syntax of your sheet reference. To have Excel insert a reference to
another sheet in your formula, do the following:
1. Start typing a formula either in a destination cell or in the formula bar.
2. When it comes to adding a reference to another worksheet, switch to that sheet and select
a cell or a range of cells you want to refer to.
3. Finish typing the formula and press the Enter key to complete it.
Note. When adding an Excel reference to another sheet using the above method, by default
Microsoft Excel adds a relative reference (with no $ sign). So, in the above example, you can just
copy the formula to other cells in column B on sheet VAT, the cell references will adjust for each
row, and you will have VAT for each product correctly calculated.
NOTE: The results of the formula for subjects B and C are now correct. The Total value
adjusts because of the relative cell reference, but the CONSTANT value does not because
of the absolute cell reference.
1. Copy the file BEC 2022 BGSCE.xlxs from the ICT122 Eduhub Page under Week 4 Practical
Exercises to carry out the following:
a. Calculate the CA for each student using the weights provided in K2:L6.
b. Calculate the Final Mark for each student in the worksheet Totals using CA and Exam Mark
values and weightings from the Marks worksheet
2. Copy the file cell-references.xls from the ICT122 Eduhub Page under Week 4 page:
a. Calculate the CA for each student using the weights provided.
A named range, range name, or defined name all refer to the same object in Excel; it's a
descriptive name — such as Jan_Sales or June_Profits — that is attached to a specific cell
or range of cells in a worksheet or workbook. Named ranges make it easier to use and identify
data when creating charts, and in formulas.
Additionally, since a named range does not change when a formula is copied to other cells, it
provides an alternative to using absolute cell references in formulas. There are three methods for
defining a name in Excel: using the name box, the new name dialog box, or the name manager.
This article has instructions for the name box only.
One way, and possibly the easiest way, of defining names is using the Name Box, located
above column A in the worksheet. You can use this method to create unique names that are
recognized by every sheet in a workbook. To create a name using the Name Box as shown in the
image above:
1. Open the file named Sales Rep from the ICT122 Eduhub Page, under Week 4
2. Highlight the desired range of cells in the worksheet.
3. Type the desired name for that range in the Name Box, such as Jan_Sales.
4. Press the Enter key on the keyboard. The name is displayed in the Name Box.
The name is also displayed in the Name box whenever the same range of cells is highlighted in the
worksheet.
Syntax rules to remember when creating or editing names for ranges are as follows:
1. On the Formulas tab, in the Defined Names group, click Name Manager.
2. In the Name Manager dialog box, click the name that you want to change.
3. Select one or more names by doing one of the following: To select a name, click it. ...
4. Click Delete.
OBJECTIVES
• Spreadsheet Calculation
➢ Simple Formula Calculations
➢ Simple Functions Calculations
Functions
Functions are a special kind of formula that can simplify complex calculations. The following
exercises will demonstrate the use of functions.
=B2+B3+B4+B5+B6+B7+B8
You will get the correct answer, but it’s a long formula. Adding together 50 or 100 cells like this
would be a tedious process.
A function is a predefined formula that performs calculations using specific values in a particular
order. All spreadsheet programs include common functions that can be used for quickly finding
the Sum,Average, Count, Maximum Value, and Minimum Value for a range of cells. In order to
use functions correctly, you'll need to understand the different parts of a function and how to
create arguments to calculate values and cell references.
To work correctly, a function must be written a specific way, which is called the syntax. The basic
syntax for a function is an equals sign (=), the function name (SUM, for example), and one or
more arguments. Arguments contain the
information you want to calculate. The function in
the example below would add the values of the
cell range A1:A20.
Functions can be used to take the hard work out
of many types of calculations in Excel.
=NameOfFunction(information to be calculated)
Note If you want to add together more than one group of cells, you can separate
each cell range with a comma.
E.g. =SUM(C2:C8,E2:E8,G2:G8)
This would add cells C2 to C8 and E2 to E8 and G2 to G8
MS Excel provides in-built formulae that are frequently used so that we do not have to type in
long-winded calculations. To use a function, just type in the function keyword and the parameters
on which the function will operate. The most common built-in functions are:
In the example below, it is using a basic function to calculate the average price per unit for a
list of recently ordered items using the
AVERAGE function.
If you want to learn how a function works, you can start typing that function in a blank cell to
see what it does. You can then type an open parenthesis to see what kind of arguments it
needs.
Whenever a formula contains a function, the function is generally calculated before any other
operators, like multiplication and division. That is because the formula treats the entire
function as a single value—before it can use that value in the formula, it needs to run the
function. For example, in the formula below, the SUM function will be calculated before
division. Let us look at a more complicated example that uses multiple functions:
=WORKDAY(TODAY(),3)
Here, we have two different functions working together: the WORKDAY function and the
TODAY function. These are known as nested functions, since one function is placed,
or nested, within the arguments of another.
As a rule, the nested function is always calculated first, just like parentheses are performed
first in the order of operations. In this example, the TODAY function will be calculated first,
since it's nested within the WORKDAY function.
1. Open a new workbook and enter information (numbers) in cell range C2 to F8.
2. Click in cell C9 and type =SUM(C2:C8) and press Enter. This will tell Excel to add up the sum
of all the cells from C2 to C8.
3. Click in cell D9 and Type =SUM(and then select cells D2 to D8.
4. You can type the right bracket, but if you do not Excel will put it in for you. Press Enter to
complete the function. It should look like this =SUM(D2:D8)
Note If you want to add together more than one group of cells, you can separate each cell range
with a comma.
E.g. =SUM(C2:C8;E2:E8;G2:G8) This would add cells C2 to C8 and E2 to E8 and G2 to G8
Since the SUM function is used so often, a special tool has been provided to make it easy to use.
Microsoft Excel offers many effective functions to allow us to manipulate data. Three of the most
widely used of those are the ‘LEFT’, ‘MID’, and ‘RIGHT’ functions. Separating what you need from
what you don’t need the ‘LEFT’, ‘MID’, and ‘RIGHT’ functions are designed to allow us to take out
substrings from a single string of data based on that substring’s relative position within the source
string. The syntax for the ‘LEFT’ and ‘RIGHT’ functions are the same while the ‘MID’ function
contains one additional parameter.
There are two parameters/arguments within the function: text and num_chars.
=LEFT(text;[num_chars])
The text parameter simply refers to the actual string up for manipulation, most commonly just
the cell reference that contains the string. The num_chars parameter refers to the number of
characters from the left side of the string you want to extract.
=LEFT(“excel”;2)
For instance, if you selected “2” for num_chars and your string was the word “excel”, your
returned value would be “ex”.
=RIGHT (text;[num_chars])
Arguments
• text: The text from which to extract characters on the right.
• num_chars: The number of characters to extract, starting on the right. Optional, default =
1.
Number formatting is not part of the form and will not be extracted or counted. The Excel RIGHT
function extracts a given number of characters from the right side of a supplied text string. For
example, RIGHT("apple",3) returns "ple". Use the RIGHT function when you want to extract
characters starting at the right side of text. RIGHT will extract digits from numbers as well.
1. In this case for row 2 in the example, we are looking for the first 2 characters of the original
string which is in cell A2.
2. Therefore, our first parameter (text) is “A2”.
3. Then our next parameter, num_chars, is the number of characters from the leftmost character
in the string we would like to take out.
4. In this case, we want the first 2 characters of the original string so or formula will be
“=LEFT(A2;2)” which gets us “ex”.
‘MID’ Function
The ‘MID’ function is designed to parse out a substring from neither the left or right ends of a
string, but rather a middle section of string based on the same two parameters in addition to a
third.
MID formula in Excel has three compulsory parameters i.e. text, start_num, num_chars.
Compulsory Parameters
1. Using our earlier example of the word “excel” as the string, each letter can be thought of as a
numeric position starting with 1 through 5 in this case of a string of 5 characters.
2. So if you wanted to parse out the middle most character of “excel”, you would select “3” as
your start number and “1” as your number of characters. Assuming the data string is in cell A2,
the formula would be “=MID(A2;3;1)” and our result would be the substring “c”.
In this MID Formula example, we are fetching the substring from the given text string by using the
MID formula in excel =MID(B3;2;5) it will fetch the substring from 2 character and 5 letters from
2nd position and output will be as shown in the second column.
1. Below, column A contains string data for some dates. We can use the ‘LEFT’ function to extract
the first three characters of the source string which in this case happens to be the day of the
week.
2. Taking the 4 characters on the right of the source string gives us the year and if we use the
‘MID’ function starting with the fifth character of the source string and extracting the next 6
characters, we can parse out the month and day.
This example demonstrates how easy it is to see how effective the ‘LEFT’, ‘MID’, and ‘RIGHT’
functions can be in a situation like this.
All the ‘LEN’ function does is return the length of a string in a cell and able to count letters,
numbers, special characters, non-printable characters, and all spaces from an Excel cell. In simple
words, LENGTH Function is used to calculate the length of a text in an Excel cell.
For instance, in our earlier example where we were deconstructing substrings from the string
“Excel”, the ‘LEN’ function applied to this string would give us 5.
Syntax: =TRIM(text)
Example: Suppose we have this text: “ I got my qualification at BUAN “. You do not want leading
and trailing spaces. Them you can use trim as below:
Results:
Using an IF Function
IF functions can be useful if you want an Excel formula to select from 2 different answers based
on criteria you specify. In our grades example, we can use an If function to say a student has passed
if their mark was over 50 and fail if their mark wasn’t over 50. The IF function has 3 sections with
a semi-colon between each section as shown below.
From the Insert Function dialog box, browse through the functions by clicking in the Function
category menu and selecting from the Function name choices. As each function name is
highlighted a description is provided below the Function name box.
Clicking OK to select the function opens the Function Arguments dialog box, which allows you to
choose the cells that will be included in the function.
1. As in the last previous function, we can type the cell addresses in the necessary argument
boxes.
2. We can also enter the cells using the point mode (i.e., the left mouse button).
i. Click and drag across a group of cells to enter a range of cells addresses.
ii. Use the Ctrl key and mouse to enter a union of cells addresses.
3. Excel may automatically select cells for you, but you can delete those selected cells from
the argument box and enter the desired cell addresses.
4. Click OK when all the cells for the function have been entered into the necessary argument
boxes.
1. We are still working with Joe Bloggs worksheet. Click in cell G5 and enter the heading
Pass/Fail. Enter the following IF function.
=IF(F6>=50;"Pass";"Fail")
2. The first part of the formula checks to see if the number in cell F6 is greater than 50 or equal
to 50. The = sign is important. If it was left out then someone who scored exactly 50 wouldn’t
be included.
COPYING A FORMULA
1. Select the cell that contains the formula, then position the mouse pointer over the lower-right
corner of the cell until the black cross (+) appears.
2. Drag the fill handle over the cell or cells to which you want to copy the formula, then release
the mouse button.
1. Select the cell that contains the formula, and on the Edit menu, click Copy.
2. Select the cell or cells that you want to copy it to.
a. To copy the formula and any formatting, on the Edit menu, click Paste.
b. To copy the formula only, on the Edit menu, click Paste Special, and then click Formulas.
ROUND FUNCTIONS
ROUND Function
This function rounds a number to the specified number of digits. For example, ROUND(3.18302;2)
returns the output value as 3.18
Argument Description
Create the following as it appears below and calculate the Round function and use an appropriate
function to calculate the total for Sales and Commission.
Argument Description
The number and multiple must have the same sign, else it returns #NUM! Error value.
If you use any non-numeric values such as letters or special characters, it returns #VALUE! Error.
Used for counting cells within a specified range that meet a certain criterion, or condition.
Syntax: =COUNTIF(range,criteria)
Let us count all students who failed. That is writing a formula that will count all students who got
50% or above.
1. Use BEC 2022 BGCSE file workbook from ICT122 Eduhub Page onto the desktop.
2. Select the Totals worksheet.
Count cells beginning or ending with certain characters. You can use either wildcard character,
asterisk (*) or question mark (?), with the criterion depending on which exactly result you want to
achieve. In case your Excel data include several variations of the keyword(s) you want to count,
then you can use a wildcard character to count all the cells containing a certain word, phrase or
letters as part of the cell's contents.
These formula examples demonstrate how you can use the COUNTIF function in Excel to count
the number of empty or non-empty cells in a specified range.
Using COUNTIF function for counting non-blank cells in Excel like this one:
=COUNTIF(range,"*")
If you need a universal COUNTIF formula for counting all non-blank cells in a specified range, here
you go:
=COUNTIF(range,"<>"&"")
COUNTIF Blank
If you want the opposite, i.e. count blank cells in a certain range, you should adhere to the same
approach - use a formula with a wildcard character for text values or another one (with the ""
criteria) to count all empty cells.
=COUNTIF(C2:C11, "") returns the number of all empty cells in the range C2:C11.
COUNTIFS Function
The COUNTIFS function applies criteria to cells across multiple ranges and counts the number of
times all criteria are met.
Important: Each additional range must have the same number of rows and columns as
the criteria_range1 argument. The ranges do not have to be adjacent to each other.
SUMIF Function
You use the SUMIF function to sum the values in a range that meet criteria that you specify.
For example, suppose that in a column that contains numbers, you want to sum only the values
that are larger than 5.
• In B25 through to M25, compute total sales of all consultants every month.
• In B26 through to M26, compute total sales of all over performers for each month, given
that an over performer is the one who sold more than BWP 3000.00 per month.
• In B27 through to M27, compute total sales of all under performers for each month, given
that an under performer is the one who sold less than BWP 1000.00 per month.
• In B28 through to M28, compute total sales of all normal performers for each month,
given that a normal performer is the one who sold at least BWP 1000.00 but less than
BWP 3000.00 per month.
• In B29 through to M29, compute total sales of all those whose surname is White for each
month.
In cell B35, compute total January sales for those whose surname is Brown and over performed
in February.
LOOKUP FUNCTIONS
Lookup functions are a bit like an IF function. They allow you to create a formula that will choose
from several different answers based on information in a table. Vertical and Horizontal lookup
(VLookup & HLookup) functions are available for use in Excel. Vlookup and Hlookup functions
are all related. The following table lists the differences between these functions
=VLOOKUP(Value you want to look up, range where you want to lookup the value, the column
number in the range containing the return value, Exact Match or Approximate Match – indicated
as 0/FALSE or 1/TRUE)
=HLOOKUP(Value you want to look up, range where you want to lookup the value, the row
number in the range containing the return value, Exact Match or Approximate Match – indicated
as 0/FALSE or 1/TRUE)
Syntax:
=VLOOKUP(lookup_value,table_array,column_index_num,[range_Lookup])
=HLOOKUP( lookup_value,table_array,row_index_num,[range_lookup] )
When you delete a formula, the resulting values of the formula are also deleted. However, you
can instead remove the formula only and leave the resulting value of the formula displayed in the
cell. To delete formulas along with their resulting values, do the following:
USE THE RANK AND PERCENTILE TOOL FROM THE ANALYSIS TOOLPAK
The Analysis ToolPak is an add-in for Microsoft Excel that comes with Microsoft Excel. An add-
in is simply a hidden workbook that adds commands or features to Excel.
The Analysis ToolPak is a Microsoft Office Excel add-in program that is available when you install
Microsoft Office or Excel.
To use the Analysis ToolPak in Excel, however, you need to load it first.
Before using the tool, we need to ensure that the Analysis ToolPak is present in Excel. The ToolPak
can be found on the Data tab, in the Analysis group and is accessed via the Data Analysis button.
You can see the output from the tool. Excel has
ranked every student and given them their exact
percentile (the Percent column), however, rather
than using the students’ names, there is a column
called Point, which is the row number of each
student.
These two functions work in tandem to convert the results in the Point column to the student’s
name.
N.B. The values in the lookup array must be sorted in descending order, i.e. from
largest to smallest.
MATCH FUNCTION
The MATCH function looks for the number in the Point column and then finds its exact match in
the column labelled Student No.
• array - this is a range of cells that you want to return a value from.
• row_num - the row number in array from which you want to return a value. If omitted, the
column_num is required.
• column_num - the column number in array from which you want to return a value. If omitted,
row_num is required.
1. Using the BEC 2022 BGSCE.xlxs calculate the final adjusted mark using the following
information.
a. If the final mark is less than 40% adjust the final mark by 20%
b. If the final mark is less than 50% adjust the final mark by 15%
1. ######
Problem: The column is not wide enough to display all the characters in a cell.
Fix: Extend the width of the column.
2. # Div/0!
Problem: Excel displays this error when a number is divided either by zero (0) or an empty cell.
Fix: Change the divider to a value that is not equal to 0.
3. #Name?
Problem: The text in a formula is not recognised by Excel. This is caused by misspelling the function
names. For instance =SUM(A1:A7) will result in the #Name? error.
Fix: Correct the error by entering =SUM(A1:A7).
4. #Value!
Problem: This error will be displayed if the formula includes cells that contain different data
types. =B1(85) + B2(75) +B3(data) will result in the #Value! error message.
Fix: Replace B3(data) with a numeric value and the error will be corrected.
5. #REF!
Problem: The error will be displayed when a cell reference is not valid. Deleting cells that were
referred by other formulas will cause this error.
Fix: Refer the cells to the correct ranges and the error will be corrected.
6. #NUM!
7. #NULL
Problem: Excel displays this error when you specify an intersection of two areas that do not
intersect (cross). The intersection operator is a space character that separates references in a
formula. =SUM(A1:A2 C3:C5) returns the #NULL error because the two ranges do not intersect.
Fix: =SUM(A1:A2, C3:C5) will return the correct reference.
OVERVIEW
How to use Excel to create charts. The standard charts we are going to create are bar, pie and line
charts. We will also look at Formatting Numbers and database commands in Excel.
OBJECTIVES
• Database Commands
➢ Data Form
➢ AutoFill
➢ Data Sort
➢ AutoFilter
• Creating a Chart
• Modifying Charts
➢ Moving a Chart
➢ Resizing a Chart
➢ Changing a Chart Feature
➢ Deleting a Chart
➢ Printing a Chart
DATABASE COMMANDS
DATA FORM
Provide Excel with the titles you want on the worksheet, and then add information record by
record.
Make the Form available on the Ribbon if it is not there already. Go to File menu, click Options,
and in left pane click Customize Ribbon. In right pane select All Commands from Choose
commands from drop-down options and look for Form command. Now from left pane, select
Home and click New Group, new group will be added to Home tab, click Rename and change its
name to Form, and then click Add >> button to add Form command to newly created group. Click
OK to close Excel Options dialog.
• Type the titles on to the first row of the worksheet as indicated in the figure below.
• Highlight the title heading.
• Go to Form menu on the Home tab and choose Form.
• Click OK to confirm that the top row of your selection is the header row.
• A form appears with the titles as the file names on it.
Enter the following data using a form. (Do not retype the titles again)
Form AutoFill
Activity:
1. Type in the first two values in the series in the first two cells of your list.
2. Select the cells in which you have just placed your values.
3. Move the pointer to the fill handle (small dark box in the bottom right corner of the cell
border)
4. Click and drag your mouse down over the cells you want to AutoFill to fill in.
5. Release the mouse and AutoFill will fill in the cells that you selected.
Data Sort
Activity:
1. Select the database information you want to sort. NB: Select the whole record because we
want the records to remain intact after sorting. If you don’t choose the whole record, Excel
will ask you if you want to expand the sort or not.
2. Go to Editing menu under Home tab and choose Sort & Filter.
AutoFilter
This allows you to define a criterion, and then use it to find, select and delete records in a database.
Activity:
Use AutoFilter command to display all students who got between 40 and 50
inclusive in Test 1.
CHARTS
It can often be difficult to interpret Excel workbooks that contain a lot of data. Charts allow you to
illustrate your workbook data graphically, which makes it easy to
visualize comparisons and trends. Charts help you visualize your data in a way that creates
maximum impact on your audience.
Types of Graphs
Excel has several different types of charts, allowing you to choose the one that best fits your data.
To use charts effectively, you will need to understand how different charts are used.
Pie charts make it easy to compare proportions. Each value is shown as a slice of the pie, so it is
easy to see which values make up the percentage of a whole.
Bar charts work just like column charts, but they use horizontal bars instead of vertical bars. Area
charts are like line charts, except the areas under the lines are filled in.
Surface charts allow you to display data across a 3D landscape. They work best with large data
sets, allowing you to see a variety of information at the same time.
In addition to chart types, you will need to understand how to read a chart. Charts contain several
different elements, or parts that can help you interpret the data.
Copy the worksheet information used when creating the form into a new workbook as it and save
it on the desktop named Graphs.
ICT122 2021/2022
120
100
80
MARKS
60 TEST 1
40 TEST 2
20
TEST 3
0
Kago Thabiso Olerato Tebogo Dikabo
STUDENT NAME
1. Select the cells you want to chart – in this case select data from first name to Test 3 (C7:F12),
including the column titles and row labels. These cells will be the source data for the chart.
From the Insert tab, click the desired Chart command. In our example, we will select Column.
Choose the desired chart type from the drop-down menu.
Once a chart has been created, there are several things you may want to change about the way
your data is displayed. It is easy to edit a chart's layout and style from the Design tab. Excel allows
you to add chart elements—such as chart titles, legends, and data labels—to make your chart
easier to read.
Insert pie chart and line graphs using the data from the workbook you created.
MODIFYING A CHART
Moving a Chart
1. Move the pointer anywhere into the chart (do not point to any chart feature).
2. Press and hold down the left side of the mouse.
3. Drag to your desired location.
NB: if you don’t want the chart as an object of a sheet, but rather as a new sheet on
its own, right-click on the chart and choose move chart. You will get the following
dialog box. Choose where you want to place the chart.
Resizing a Chart
Changing a Feature/Properties
1. Select the chart you want to resize
2. Move your pointer to any of the little, 1. Select the chart
small squares around the chart 2. Choose either Design, Layout or Format
3. Drag to change the size. from the Chart Tools
3. Change the features as you wish.
OR
NB: Right-clicking the chart area will give you only limited options, so it’s better
to use Chart Tools from the Ribbon.
Deleting a Chart
Printing a Chart
PRINTING WILL NOT YIELD ANYTHING AS THERE IS NO PRINTER CONNECTED TO THE LAB
COMPUTERS.
Express the category, colour, size and quantity of the beads in Elisa’s bead collection.
Now answer the following questions, using as many different Excel commands as possible:
87 | P a g e
3. What is the mean, median and mode of the bead size within this collection?
4. Create a chart (i.e. graph) to illustrate the spread of the bead collection. Choose any
three of the charts.
Capture the following information in a 3‐column balance sheet, showing columns for
“Budget”, “Expense” and “Balance”. Then, generate a chart illustrating the monthly expenses
up to December 2020.
1. Capture the following information in a pie chart. Label each segment of the pie with their
Pula (BWP) value in addition to their percentage share of the total budget.
2. Total budget: P100,000
3. Book budget: 50% of total budget (of which a quarter is electronic)
4. Serials budget: 35% of total budget (of which half are electronic)
5. Audio visual budget: 10% of total budget
6. Taxes and shipping costs: 5% of total budget
88 | P a g e
WEEK 11 CREATING SIMPLE DATABASE
OBJECTIVES
By the end of the laboratory session, you should be able to do the following:
• Create a Database
• Save a Database
• Create and Save Tables/Relations
• Declare Primary Keys
• Edit Field Properties
• Enter Data in a Database
INTRODUCTION TO DATABASES
What is a Database?
A database is a structured repository for data. A database in manual terms is like a filing
cabinet, or more accurately to a series of filing cabinets. The overall purpose of such
repository is to maintain data for some set of organizational objectives. Most database
systems are built to retain the data required for running of the day-to-day activities.
An example is a university database that will be needed for such activities as recording
assessment of student courses. Therefore, we talk of a database as being a collection of data
structures. The data in the database should always be related.
The term database also usually implies a series of related properties: data sharing, data
integration, data integrity, data security, data abstraction and data independence. (These
properties are discussed in your presentation notes).
Basically, a database is effectively a set of data structures for organizing and storing data.
89 | P a g e
6. The ordering of rows is not significant.
7. Each cell or column/row intersection in a relation should contain only a so-called
atomic value. In other words, multiple values are not allowed in the cell of a relation.
Primary Key
Each relation should have a primary key. This is to enforce property number 5 above, that
duplicate rows are forbidden in a relation. A primary key is one or more columns of a table
whose value is used to uniquely identify each row or record in a table. A primary key must
have the following properties:
1. It must be unique.
2. It must not be null.
Foreign Key
Foreign keys are the means of interconnecting the data stored in a series of disparate tables.
A foreign key is a column or group of columns of some table which draws its value from the
same domain as the primary key of some related table in the database.
Starting MS Access
To start MS Access:
When MS Access is launched, a dialog box appears which provides you with several options;
see the figure below.
You can choose to create a Blank database, Blank web database, database from templates
or even Open an Existing database file.
90 | P a g e
"Create a New Database" dialog box
Now click the button next to File name textbox and specify
where you want to save your database. Let us save it under Desktop.
91 | P a g e
Now an empty database has been created. The next part is to add objects, starting by adding
tables or relations.
Creating Tables/Relations
Rows and Columns are referred to as records and fields. A field is more than just a column;
it’s a way of organizing information by the type of data it is. Every piece of information within
a field is of the same type.
Note: When you create database, by default it comes with one table called table1 as shown
on the diagram above. You should change the name of the table to any name in your database.
92 | P a g e
Now enter the names of the columns for
the table under Field Name and Data Type
(text, number, etc). The first field is
already added for you and defined as
primary key.
The Description is optional but it’s
important to explain your fields.
As already explained, a primary key is a field that will uniquely identify any record in a table;
therefore, each table must have a primary key. Once all the columns have been entered into
the design view a primary key for that table should be selected. In our example the
customer_id will be the primary key. It is already set for you. However, if it is not set then
follow the following steps:
Field properties are set to control how the data in the fields can be entered and how the fields
behave. The properties allow you to:
93 | P a g e
6. If a field is to be indexed.
The properties are associated with each field. See the table below for field properties.
Required Allows the user to not leave nulls against PublicationNo - Yes
field
To edit the properties of a field, select the field and the properties will be displayed at the
bottom.
94 | P a g e
Select all other fields and edit their properties as below:
95 | P a g e
3. Click Create tab on the ribbon.
Pet_id
Year([Date_of_birth])
96 | P a g e
Medical Conditions
Saving a Table
Alternatively
To save the table do Ctrl+S then a dialog box will appear for you to enter the name of the
table. Enter the name then hit save.
Fields
97 | P a g e
Edit the field properties as below:
Appointment_id Customer_id
Challenge: Add the validation rule to the Appointment date so that it returns error message
“Please enter today’s date or later date” if the user enters any date before today.
Entering Data
After creating the table, we now need to enter some data into it. To enter data we need to
view the table in Datasheet View.
98 | P a g e
Type data into the tables as below:
Customer Table
Pet Table
Appointment Table
Make sure you complete this exercise before the end of the lab session and save the file as it
will be used in the next two (2) practical sessions in Week 11 and 12.
99 | P a g e
Read the scenario below:
The Food Girls is a youth company that supply readily cooked food to their customers. They
supply variety of cooked food including chicken/beef burgers, quarters, pizzas, fried potato
chips, fizzy drinks, juices, coffees, etc. They sell their products from home. Customers place
an order by walking in, a phone call, WhatsApp message or Facebook chat line. Customer
order is recorded using an Excel file, then they prepare food and either deliver or customer
go to their home to collect. A customer may place an order at any time during the day. An
order may have variety of products. Each product may be ordered by different customers for
as long as is available. A customer may order as many times as he/she wishes per day or in
different days.
Create a new database and call it Food Girls based on the scenario above. The database
should be saved on the desktop and the move it to your One drive after adding all tables.
Table 1: CUSTOMERS
CUSTOMERS
Field Name Data Type Description
Primary Key CustNo Number Unique for each customer
CustName Text First name
CustSurname Text Last Name
ContactNo Number Telephone Number
A:
CustNo CustName
Field Size Integer 20
Format General Number
Required Yes No
Indexed Yes (no duplicates) No
View the table in Datasheet View and enter sample data, of at least 10 records.
100 | P a g e
Q: Why is CustNo set as required and is indexed with no duplicates?
A:
View the table in Datasheet View and enter sample data, of at least 10 records.
Table 2: PRODUCTS
PRODUCTS
Field Name Data Type Description
Primary Key ProductNo Number Unique for each product
ProductName Text Name of product
QtyInStock Number Number of items in stock
Price Currency Unit Price in stock
RecordLevel Number Level at which to place order
RecordQty Number Amount normally in an order
View the table in Datasheet View and enter sample data, of at least 10 records.
Table 3: ORDERS
ORDERS
Field Name Data Type Description
OrderNo Number Enter Description
CustNo Number Enter Description
101 | P a g e
OrderDate Date/Time Enter Description
View the table in Datasheet View and enter sample data, of at least 10 records.
A:
Set the primary key, view the table in Datasheet View and enter the following data sample:
A: Because it would be inefficient! i.e. you can easily find out the customer’s name from the
CUSTOMERS table if you know the customer’s number. (also, it could cause some
inconsistency in the database if you misspelled the customer’s name in one place but not in
another. Think about which customer name would be correct).
A:
ORDERS DETAILS
Field Name Data Type Description
ProductNo Number Enter Description
OrderNo Number Enter Description
Quantity Number Enter Description
102 | P a g e
Q: Which fields should be set as the primary key and why?
A:
Hint: Combinations of two key fields will always uniquely identify the product ordered on a
specific order.
Set the primary key, view the table in Datasheet View and enter the following data sample:
A:
103 | P a g e
WORKING WITH CALCULATED FIELDS AND EXPRESSIONS
A calculated field is a field that derives its value by performing a function on values from
other table fields. It can also calculate values entered by hand. The field’s data only appears
for the duration of the query. It is not actually stored in the database tables. When a
calculated field is created in Access, almost any available function can be performed. You can
also use the query field to type data as values for the calculations.
Download the pet clinic database file from Eduhub on the ICT122 page Week 9 to your
OneDrive.
Text Fields
Open the database and go to Customer table. We are going to add calculated text field to the
table.
Add a new field called full_name to the table. The Data Type should be calculated.
Under Field properties, got expression and click on the button to the far right.
or
Creating space between name and surname
Click OK
104 | P a g e
The expression joins two fields: custName and CustSurname
All the field should be added inside the square brackets when writing expression in MS access.
Add a new field to the Customer table and call it Initial_Surname. The field should have Field
Type as Calculated.
1. Go to Expression Builder. To get the initial, we will use the Left function.
2. Type the following expression:
3. Click OK.
Go to veterinarian table and create a new calculated field called vetInfo. vetInfo field should
displays surname of veterinarian, followed by (,) followed by initial and (.)
For example:
Vet_name: Johnson
Vet_surname: Hill
vetInfo: Hill, J.
Numeric Fields
Calculated field is added using numeric values from other fields or built-in functions.
Mathematical expressions are used to do the computation.
105 | P a g e
In the payment table, suppose Total_cost is calculated from adding prescription_cost and
consultation_cost.
Now, add a field called Total_cost to payment table, and make its Data Type to be calculated.
Date fields
Strings and numeric vales can also be combined. Add another field to payment called price.
The expression for the field should be as below:
106 | P a g e
WEEK 12: RELATIONSHIPS AND FORMS
OBJECTIVES
• Create Relationships
• Creating Forms
RELATIONSHIPS
One of the major advantages of databases like Microsoft Access is its ability to
maintain relationships between different data tables. The power of a database makes it
possible to correlate data in many ways and ensure the consistency (or referential
integrity) of this data from table to table.
107 | P a g e
The Relationships tab allows you to establish the relationship by clicking and dragging a
field over a field on another table. By dragging the Customer.CustId field over
Order.custNum, a relationship is established between the two tables, with
Customer.CustId as the primary key and Orders.CustNum as the foreign key.
The Edit Relationships window will appear. The Relationship Type is also shown.
9. Click Create to create the link. A line now connects the two fields in the Relationship
window.
Create relationship between other tables so that your database is complete and should look
like the one below.
The datasheet of a relational table will provide expand and collapse indicators to view sub-
datasheets containing matching information from the other table.
108 | P a g e
1. In the example below, the CUSTOMERS and ORDERS tables were related and the two
can be shown simultaneously using the expand feature.
FORMS
Forms in Access are like display cases in stores that make it easier to view or get the items
that you want. Since forms are objects through which you or other users can add, edit, or
display the data stored in your database, the design of your form is an important aspect.
There's a lot you can do design-wise with forms in Microsoft Access. You can create two basic
types of forms −
• Bound forms
• Unbound forms
Bound Forms
Let us now understand what Bound Forms are −
• Bound forms are connected to some underlying data source such as a table, query, or
SQL statement.
• Bound forms are what people typically think of when they think of the purpose of a
form.
• Forms are to be filled out or used to enter or edit data in a database.
• Examples of bound forms will typically be what users use to enter, view or edit data in
a database.
109 | P a g e
Unbound Forms
CREATING FORMS
There are a few methods you can use to create forms in Access.
Open your Database if it is not already open, then go to the Create tab.
In the Forms group, in the upper right-hand corner you will see the Form Wizard button.
110 | P a g e
2. On this first screen in the wizard, you can select fields that you want to display on
your form, and you can choose from
fields from more than one table or a
query.
3. Let us assume we want to simply have a
quick form that we are going to use for
data entry for our customer information.
4. From Tables/Queries drop-down list,
select Customer table. Click on the
double arrow to move all the fields at
once.
5. Click Next.
111 | P a g e
Let us now close this form and go to the
Create tab. Now we will create a slightly
more complicated form using Wizard.
Click the Form Wizard and this time, we
will choose fields from a couple of
different tables.
In this Form Wizard,
choose customer for Tables/Queries,
and select a few Available Fields such as
custname and Surname. These fields will
now move to Selected Fields.
Now select Order for Tables/Queries and send over the OrderNum and Date.
Click Next.
Here, we want to retrieve data from a couple
of different objects. We can also choose from
options on how we want to arrange our form.
If we want to create a flat form, we can choose
to arrange by order, which will create that
single form, with all the fields laid out in flat
view as shown above.
However, if we want to create a hierarchical
form based on that one-to-many relationship,
we can choose to arrange our data by
customer.
In the above window, we have the option to
include a subform for orders, or we can make that a linked form. This linked form is where
customer will have a button that will launch that second form filtered to the project that we
have selected in that underlying customer form.
Let us now select the Form with subform(s), and then click Next.
112 | P a g e
In the following screen, you can choose a layout for your subform. The Datasheet View gets
selected by default. The Datasheet View is similar to Table View. Now, click Next.
In the following screen, you need to provide a name for your forms. Enter the name you want
(e.g frmcustom_order) and click Finish.
113 | P a g e
To create this type of form, you will
need to select the object in
navigation pane first. Let us
select Product/Item here.
1. From the Create tab, click on the Form Design button under Forms group.
2. In the Tools group under Form Design Tools, click on the Existing Fields button
3. On the Field List pane on the right, click on Show All tables
4. Choose the table or query the form will be associated with from the drop-down menu.
5. Add controls to the form by clicking and dragging the field names from the Field List
floating window. Access creates a text box for the value and label for the field name when
this action is accomplished.
114 | P a g e
Adding Records Using a Form
Input data into the table by filling out the fields of the form. Press the Tab key to move from
field to field and create a new record by clicking the Tab key after the last field of the last
record. A new record can also be created at any time by clicking the New Record button
at the bottom of the form window. Records are automatically saved as they are entered so
no additional manual saving needs to be done.
Editing Forms
115 | P a g e
3. Change form object type – To easily change the type of form object without having to
create a new one, right click on the object with the mouse and select Change To and select
an available object type from the list.
4. Label/Object alignment – Each form object and
its corresponding label are bounded and will
move together when either one is moved with
the mouse. However, to change the position of
the object and label in relation to each other (to
move the label closer to a text box, for example),
click and drag the large handle at the top left
corner of the object or label.
5. Tab order – Alter the tab order of the objects on
the form by selecting Tools | Tab Order from the
ribbon (or right click on the form and choose Tab
Order from the subsequent menu). Click the gray
box before the row you would like to change in the tab order, drag it to a new location,
and release the mouse button.
6. Form Appearance – Change the background colour of the form by right clicking on the
form and choosing Fill/Back Colour from the menu that appears and then clicking one of
the colour swatches on the palette. Change the colour of individual form objects by right
clicking on one and selecting a colour from the Font/Fore Colour palette on the menu that
appears. Other properties like the size, position, font effect, alignment, border around
each object, special effect, etc can also be modified the same way.
7. Page Header and Footer – Headers and footers added to a form will only appear when it
is printed. Access these sections by right clicking on the form and choosing the appropriate
section from the menu that follows. A date and time can be added from Design |
Header/Footer|Date and Time.
116 | P a g e
WEEK 13: QUERIES AND REPORTS
OBJECTIVES
QUERIES
Queries select records from one or more tables in a database so they can be viewed, analysed,
and sorted on a common datasheet. The resulting collection of records, called a dynaset
(short for dynamic subset), is saved as a database object and can therefore be easily used in
the future. The query will be updated whenever the original tables are updated.
• Select
• Update
• Delete
Select Queries
Extract data from tables based on specified values, find duplicate queries that display records
with duplicate values for one or more of the specified fields, and find unmatched queries
display records from one table that do not have corresponding values in a second table.
117 | P a g e
Creating Select Query.
Let us create a query that gets data from one table with no criteria. Let's say our Food girls
company is having a special event, and want to invite all their customers. This means we need
to see a list of all customers in the database. A query must be created to display the
information as required. We are going to display customer’s id, surname, and name from
customer’s table.
118 | P a g e
9. If you want, save your query by clicking
the Save command in the Quick Access
Toolbar. When prompted to name it, type
the desired name, then click OK.
Now you know how to create the simplest type of query with only one table.
Suppose we want to display customer ids,names and surname of all customers who were
born before year 2000.
119 | P a g e
Add the query using customer’s
table and add all appropriate fields.
Suppose we want to display all orders placed by Moakofhi. The data to be displayed include
name of the customer who placed an order, order number and all items ordered. In this case,
name of the customer will come from the customer’s table, order number from orders table
and product name from product’s table.
120 | P a g e
Save the query.
In addition, Access provides several ways to add Sum and other aggregate functions to a
query. You can:
▪ Open your query in Datasheet view and add a Total row. The Total Row, a feature in
Access, allows you to use an aggregate function in one or more columns of a query
result set without having to change the design of your query.
121 | P a g e
A new Total row appears in your datasheet.
1. In the Total row, click the cell in the field that you want to sum, and then
select Sum from the list.
1. Create a totals query. A totals query calculates subtotals across groups of records; a Total
row calculates grand totals for one or more columns (fields) of data. For example, if you
want to subtotal all orders by each customer or by year, you use a totals query to group
your records by the desired category and
you then sum of all sold items.
2. Let us create a query that computes total
number of orders made by each customer.
3. On the Create tab, in the Other group,
click Query Design.
4. In the Show Table dialog box, add table
that you want to use in your query. Let us
add all the tables and then click Close.
122 | P a g e
3. Click Run to run the query and display
the results in Datasheet view.
4. Save the query.
Parameter Queries
The criteria is dynamic – every time a parameterized query is run, the user is prompted to
enter the criteria value they want to use.
Suppose we want to create a query that search a customer by surname, then displace
information about the searched customer.
123 | P a g e
Update Queries
An Update Query is an action query (SQL statement) that changes a set of records according
to criteria (search conditions) you specify. It's a very powerful feature and a fundamental part
of relational databases since you can modify a huge number of records at one time.
Understanding and using Update Queries improves the performance of your applications
(versus doing the same changes manually or in code), and makes them easier to maintain.
5. Let us update date of birth for one of the records. In this example, we will change the date
of birth for customer number 2007 from 2013/04/28 to 1983/03/03.
124 | P a g e
7. Run the query. The message will be displayed:
8. Click Yes to update the record. Now, go to
datasheet view of the table and you will see that
the record is updated.
Delete Query
When to either quickly delete a lot of data or delete a set of data on a regular basis in
an Access desktop database, a delete or an update query might be useful because the
queries make it possible to specify criteria to quickly find and delete the data.
REPORTS
Reports will organise and group information in a table or query and provide a way to print
that data in a database.
To create a report using the assistance of the wizard, follow these steps:
1. Click the Report Wizard button from the Reports group under Create tab
125 | P a g e
2. Select the table or query whose datasheet the report will be associated with from the
Tables/Queries drop-down menu.
3. Select the fields that will be included on the report by highlighting each on the Available
Fields window and clicking the single right button > to move the field to the Selected
Fields window.
4. To move all the fields to the Selected Fields window at once, click the double right arrow
button >>. If you make a mistake and would like to remove a field or all the fields from
the Selected Fields window, click the left arrow < or left double arrow << buttons
respectively. After the proper fields have been selected, click the Next > button to move
on to the next screen.
5. Select fields from the list that the records should be grouped by and click the right arrow
button > to add those fields to the diagram. Use the Priority buttons to change the order
of the grouped fields if more than one field
is selected. Click Next > to continue.
126 | P a g e
7. Select a layout and page orientation for the report and
click Next >.
8. On the final screen, name the report and select to open it in either Print Preview or Design
View mode. Click the Finish button to create the report.
1. From the Create tab, click on the Report Design button under Reports group.
2. You will be presented with a blank grid that looks like the Design View for forms. Design
the report in much the same way you would create a form. For example, use the handles
on the elements to resize fields, move them to different locations, and modify the look of
the report by using options on the formatting toolbar. Click the Print View button at the
top left corner of the screen to preview the report.
Printing Reports
Right click on the report and choose Print Preview from the menu that appears. Use the Print
Preview tab on the ribbon to modify the page margins, size, orientation, and column setup.
After all changes have been made, print the report by selecting File | Print from the ribbon.
127 | P a g e
FACULTY: SCIENCES
COURSE FACILITATORS:
CREDITS 2
TYPE General Education Course
SEMESTER 2
PRE-REQUISITES None
CO-REQUISITES None
COURSE SYNOPSIS
128 | P a g e
RATIONALE
This course offers a further introduction to the computer system environment and problem-
solving with the help of the computer. The emphasis is on practical hands-on experience. The
course helps students with understanding presentation skills. It will also focus on equipping
student with basic spreadsheet and database skills. It will introduce further computing skills.
The course will further equip students with basic skills require for academic work.
129 | P a g e
COURSE OUTLINE
130 | P a g e
WEEK 7 : MID-SEMESTER BREAK
Lecture 7: Advanced
Creating a database using MS
functions (Joining sheets,
Complex Functions and Access.
Week 8 Mathematical, Statistical,
Formulas. Creating tables; Entering and
Lookup, Financial,
Modifying records on a table.
Database).
Basic Concepts; Definition of
Lecture 8: Introduction to database, Database
Week 9 Practical Test 1
Database Concepts. Management System; Types
of databases.
Public Holidays 1st and 2nd
May
Week 10
Lab opened on Wed – Fri for
practicing.
MODE OF ASSESSMENT
Continuous Assessment: This will comprise one theory test, two practical tests, two quizzes
and two laboratory exercises. Continuous Assessment will contribute 50 % of the total score,
with the other 50 % coming from the Final Examination, to be written at the end of the
semester. Thus, the ratio between continuous assessment and the final examination will be
1:1.
131 | P a g e
CONTINUOUS ASSESSMENT BREAK DOWN (50%)
SEMESTER
ASSESSMENT TYPE DATES
WEEK
MON 27TH MARCH 2023 – FRI 31ST MARCH
5 LAB EXERCISE 1
2023
WED 5TH APRIL 2023
6 QUIZ 1 (ONLINE) EDUHUB
(OPENS: 09:00AM – CLOSES: 21:00 PM)
9 PRACTICAL TEST 1 24TH APRIL 2023 – 28TH APRIL 2023
RECOMMENDED TEXTBOOK
Parsons, J. J., & Oja, D. (2014). Practical Computer Literacy (with CD-ROM) (New Perspectives)
(4th ed.). Boston: Thomson Course Technology.
132 | P a g e
WARNING:
• PLEASE NOTE: THERE WILL BE NO MAKE-UP FOR LAB EXERCISES AND TESTS PROVIDED.
• MAKE SURE YOU WRITE ALL YOUR LAB ASSESSMENTS IN YOUR ALLOCATED GROUP SLOT/DAY.
• THE USE OF MOBILE PHONES DURING PRACTICAL TESTS, QUIZZES, LABORATORY EXERCISES,
THEORY TEST AND FINAL EXAMINATION IS PROHIBITED.
• IF YOU MISS ANY OF THE CONTINUOUS ASSESSMENTS, YOU HAVE FIVE (5) WORKING DAYS TO
NOTIFY ANY OF ICT122 COORDINATORS (WITH A VALID REASON(S) TO SUPPORT YOUR
ABSENTEEISM), ELSE YOU WILL BE GIVEN A ZERO (0) MARK.
• FINALLY, ALWAYS WASH HANDS WITH CLEAN WATER AND SOAP, SANITISE HANDS, AND STAY
SAFE FROM COVID-19.
• MAKE APPOINTMENT WITH ANY OF THE COURSE FACILLTATOR ON ANY TOPIC(S) YOU ARE
HAVING A CHALLENGE TO UNDERSTAND.
133 | P a g e
ICT122 LECTURES AND PRACTICAL SESSIONS TIMETABLE
ICT122 P1[2] ICT122 P1[3] ICT122 P1[7] ICT122 P1[6] ICT122 P1[1]
1400 – 1655 VENUE: 305/001 VENUE: 305/001 VENUE: 305/001 VENUE: 305/001 VENUE: 305/001
PHIRI PHIRI MOSIPURI MONCHUSI MONCHUSI
134 | P a g e