ExcelManual
ExcelManual
Microsoft Excel
1
THESE MATERIALS, AVAILABLE FROM WWW.LEARNINGTECHNOLOGIES.AC.UK, MAY BE
USED BY STAFF IN THE POST-16 SECTOR AS FOLLOWS; COLLEGES OF FURTHER
EDUCATION, SIXTH FORM COLLEGES, SPECIALIST COLLEGES, ADULT AND COMMUNITY
EDUCATION INSTITUTIONS AND UK ONLINE CENTRES IN ENGLAND AND WALES ON A NOT
FOR PROFIT BASIS. ALL © RIGHTS RESERVED BY THE ORIGINAL AUTHORS
Part One: Excel Fundamentals………………………………………………………………………3
The Interface....................................................................................................... 3
Performing Simple Calculations...........................................................................3
Using Simple Functions and Cell Ranges.............................................................4
The sum() Function........................................................................................... 4
The average()
Function………………………………………………………………………………………5
The count() Function........................................................................................5
The Gentle Art of Cell Formatting........................................................................5
Alignment......................................................................................................... 6
Font.................................................................................................................. 6
Border.............................................................................................................. 6
Patterns............................................................................................................ 7
Protection......................................................................................................... 8
Using Form Controls – An Introduction.................................................................8
2
THESE MATERIALS, AVAILABLE FROM WWW.LEARNINGTECHNOLOGIES.AC.UK, MAY BE
USED BY STAFF IN THE POST-16 SECTOR AS FOLLOWS; COLLEGES OF FURTHER
EDUCATION, SIXTH FORM COLLEGES, SPECIALIST COLLEGES, ADULT AND COMMUNITY
EDUCATION INSTITUTIONS AND UK ONLINE CENTRES IN ENGLAND AND WALES ON A NOT
FOR PROFIT BASIS. ALL © RIGHTS RESERVED BY THE ORIGINAL AUTHORS
Part One: Excel Fundamentals
The Interface
Excel’s toolbars and menus follow a fairly standard format and share common
features with many of Microsoft’s other products.
Towards the top of the window is the fairly standard array of toolbars and menus,
many of which are specific to Excel itself.
An Excel worksheet is split into cells. Each cell can be referenced using the grid
present within Excel itself. Using a combination of the column (represented by a
letter) and the row (represented by a number) you can quickly reference any cell
using a simple notation such as A1, B16, C24. When you later move onto working
with calculations and formulae you’ll be using cell references a lot.
3
THESE MATERIALS, AVAILABLE FROM WWW.LEARNINGTECHNOLOGIES.AC.UK, MAY BE
USED BY STAFF IN THE POST-16 SECTOR AS FOLLOWS; COLLEGES OF FURTHER
EDUCATION, SIXTH FORM COLLEGES, SPECIALIST COLLEGES, ADULT AND COMMUNITY
EDUCATION INSTITUTIONS AND UK ONLINE CENTRES IN ENGLAND AND WALES ON A NOT
FOR PROFIT BASIS. ALL © RIGHTS RESERVED BY THE ORIGINAL AUTHORS
In the example above, the formula provided in the highlighted cell will add
together the values of cells B2 and C2. Notice how the calculation was preceded
with the = sign. The = sign tells Excel that the cell is going to contain some form
of calculation. Without this, it would simply display b2+c2 as text.
The biggest advantage here is that D2 will always contain the sum of B2 and C2.
If later you update B2 to (say) 5, the value of D2 would automatically change to 8
to represent this change.
Alongside addition this simple calculation format can also be used for:
Subtraction ( - )
Multiplication ( * )
Division ( / )
Notice how the format changes. First comes the familiar = sign, telling Excel this
cell will contain a calculation or formula of some sort.
=sum(b2:g2)
‘sum’ is the name of the function; the brackets contain the arguments, in this
case the cell range. Read the colon ( : ) as the word ‘to’. Basically the software is
being asked to sum up all the values from cell B2 to cell G2.
4
THESE MATERIALS, AVAILABLE FROM WWW.LEARNINGTECHNOLOGIES.AC.UK, MAY BE
USED BY STAFF IN THE POST-16 SECTOR AS FOLLOWS; COLLEGES OF FURTHER
EDUCATION, SIXTH FORM COLLEGES, SPECIALIST COLLEGES, ADULT AND COMMUNITY
EDUCATION INSTITUTIONS AND UK ONLINE CENTRES IN ENGLAND AND WALES ON A NOT
FOR PROFIT BASIS. ALL © RIGHTS RESERVED BY THE ORIGINAL AUTHORS
The average() Function
=average(b2:g2)
You’ll find this function very useful when preparing online quizzes or similar tests
as it will enable you to provide average scores for answers and results.
Count() is used for adding up every instance of a value in a series of cells. Take
the diagram below as an example.
You can see in the example that 4 cells in the range specified have values in
them, so the value returned from the count function is 4.
This simple function has many practical uses, for example keeping a tally of
correct answers for a quiz or totalling up the number of questions a student has
answered.
5
THESE MATERIALS, AVAILABLE FROM WWW.LEARNINGTECHNOLOGIES.AC.UK, MAY BE
USED BY STAFF IN THE POST-16 SECTOR AS FOLLOWS; COLLEGES OF FURTHER
EDUCATION, SIXTH FORM COLLEGES, SPECIALIST COLLEGES, ADULT AND COMMUNITY
EDUCATION INSTITUTIONS AND UK ONLINE CENTRES IN ENGLAND AND WALES ON A NOT
FOR PROFIT BASIS. ALL © RIGHTS RESERVED BY THE ORIGINAL AUTHORS
Alignment
Horizontal and
Vertical alignment
settings
Font
The font tab offers the standard font formatting controls present in all Microsoft
applications. For a detailed reference to this panel, please see the Font
Formatting section in the Word manual.
Border
The border tab allows you to control the look of the border of the cells you
currently have selected. The tab looks like this:
6
THESE MATERIALS, AVAILABLE FROM WWW.LEARNINGTECHNOLOGIES.AC.UK, MAY BE
USED BY STAFF IN THE POST-16 SECTOR AS FOLLOWS; COLLEGES OF FURTHER
EDUCATION, SIXTH FORM COLLEGES, SPECIALIST COLLEGES, ADULT AND COMMUNITY
EDUCATION INSTITUTIONS AND UK ONLINE CENTRES IN ENGLAND AND WALES ON A NOT
FOR PROFIT BASIS. ALL © RIGHTS RESERVED BY THE ORIGINAL AUTHORS
Border presets.
Preview and
customisation
controls.
Border colour
setting.
Patterns
7
THESE MATERIALS, AVAILABLE FROM WWW.LEARNINGTECHNOLOGIES.AC.UK, MAY BE
USED BY STAFF IN THE POST-16 SECTOR AS FOLLOWS; COLLEGES OF FURTHER
EDUCATION, SIXTH FORM COLLEGES, SPECIALIST COLLEGES, ADULT AND COMMUNITY
EDUCATION INSTITUTIONS AND UK ONLINE CENTRES IN ENGLAND AND WALES ON A NOT
FOR PROFIT BASIS. ALL © RIGHTS RESERVED BY THE ORIGINAL AUTHORS
Protection
The protection tab only really comes into play when locking worksheets or
creating secure applications.
Locking (or unlocking) cells on a protected worksheet allows you to define areas
where the user is able to enter information. This is particularly useful for the
creation of online forms or quiz type worksheets.
To begin with, if you can’t already see it, select View > Toolbars > Forms to
make the forms toolbar visible.
Above you can see the forms toolbar. Examine the icons from left to right.
Label is just that - a quick way of adding a wholly transparent floating text
box to a form.
Edit Box, when available, allows you to enter a text field which the user can
type into. This option isn’t used very often as a spreadsheet cell can
effectively serve the same purpose.
8
THESE MATERIALS, AVAILABLE FROM WWW.LEARNINGTECHNOLOGIES.AC.UK, MAY BE
USED BY STAFF IN THE POST-16 SECTOR AS FOLLOWS; COLLEGES OF FURTHER
EDUCATION, SIXTH FORM COLLEGES, SPECIALIST COLLEGES, ADULT AND COMMUNITY
EDUCATION INSTITUTIONS AND UK ONLINE CENTRES IN ENGLAND AND WALES ON A NOT
FOR PROFIT BASIS. ALL © RIGHTS RESERVED BY THE ORIGINAL AUTHORS
Group Box allows you to group two or more controls together. For example
this is used to tell Excel that certain radio buttons or check boxes are options
for the same question etc.
Button is just that. One of the most common uses of buttons is as controls. By
assigning macros to buttons we are able to add a lot of functionality into
Excel. A macro is a saved sequence of commands or keyboard strokes that
can be stored and then recalled with a single command or keyboard stroke.
The example at the end of this manual uses a button to reset and calculate
the score on the quiz.
Check Box also does just that. Adding a check box allows the user to tick /
untick a control providing you with a TRUE or FALSE in a cell of your choice.
Radio Buttons work in a very similar way to checkboxes, the difference being
that they work in groups and not on their own and, instead of returning a
TRUE/FALSE value in the cell you specify, the group will return a numbered
value which was dependent on which option was selected. This is very similar
to the drop down box control looked at later.
List Boxes present a scrolling list of items in a very similar way to a drop
down box. As with the drop down box you need to provide a cell reference for
the output value (a number representing the option that’s selected) and an
input range (a range of cells that contain the options the list box will contain).
The key advantage of a list box over a drop down box is that it’s possible to
select more than one item by holding the CTRL key and clicking on the
options.
Drop Down Boxes are covered in detail in the section entitled “Adding Drop-
Down Boxes and Input Ranges”, within the exercise at the end of this manual.
The next two icons are used for editing and customising List Boxes and Drop
Down Boxes once they’re added to your worksheet.
Scroll Bars are ideal for questions or options that can have a lot of different
numerical values. Imagine a question that could have any answer between 1
and 100 - the easiest option would be to create a scroll-bar, with a minimum
value of 1 and maximum of 100 that is incremented in steps of 1. A scrollbar
also has a cell link attached to the control. This cell’s value will update to
reflect the current state of the scrollbar.
Control Properties is used to access quickly the properties for any form
control in your workbook.
Every form control has Visual Basic code underlying it that controls how it
works and what it does. Edit Code is a shortcut to access the code for a
particular form control.
Toggle Grid can be used to switch on or off the gridlines which surround the
spreadsheet’s cells.
The Excel Help facility gives a detailed description of all of Excel’s form controls
and how they can be used in conjunction with macros to create fully functional
learning applications.
9
THESE MATERIALS, AVAILABLE FROM WWW.LEARNINGTECHNOLOGIES.AC.UK, MAY BE
USED BY STAFF IN THE POST-16 SECTOR AS FOLLOWS; COLLEGES OF FURTHER
EDUCATION, SIXTH FORM COLLEGES, SPECIALIST COLLEGES, ADULT AND COMMUNITY
EDUCATION INSTITUTIONS AND UK ONLINE CENTRES IN ENGLAND AND WALES ON A NOT
FOR PROFIT BASIS. ALL © RIGHTS RESERVED BY THE ORIGINAL AUTHORS
Part Two: Creating a Simple Quiz
The Purpose
This exercise will allow you to create a simple quiz using a series of drop down
boxes on an Excel Spreadsheet. The user will have to select what they believe to
be the correct answer to each question, and then click on a button which will
calculate their score as a percentage. All this will be housed in a wholly secure
spreadsheet application which can be distributed as needed and adapted to suit
any form of quiz or question set.
The Exercise
Setting Up
First of all you need to create a new Excel spreadsheet by selecting File >
New and creating a new workbook.
The first step here is setting up the look and feel of the exercise. Ensuring
Sheet 1 is selected, add a title to the exercise. You may also wish to add some
instructions to the quiz as well, though you will learn how to do this using Tool
Tips later on. The formatting and look of the title is a purely aesthetic choice
and is up to you. The example here is titled Web Development 101.
Next you need to add the questions. Again, this is just a case of entering text
in the appropriate cells. Add the following questions to your exercise:
10
THESE MATERIALS, AVAILABLE FROM WWW.LEARNINGTECHNOLOGIES.AC.UK, MAY BE
USED BY STAFF IN THE POST-16 SECTOR AS FOLLOWS; COLLEGES OF FURTHER
EDUCATION, SIXTH FORM COLLEGES, SPECIALIST COLLEGES, ADULT AND COMMUNITY
EDUCATION INSTITUTIONS AND UK ONLINE CENTRES IN ENGLAND AND WALES ON A NOT
FOR PROFIT BASIS. ALL © RIGHTS RESERVED BY THE ORIGINAL AUTHORS
2. Which company introduced the <blink> tag?
5. What are the default ports for HTTP and HTTPS respectively?
Ensure these are well spaced out and easy to read. It’s also worth making sure
your screen doesn’t scroll too much.
Form Controls will be used a lot in this exercise, so it’s a good idea to have the
forms toolbar showing at all times. To activate it (if you’ve not already done
so) select View > Toolbars > Forms.
The only form elements you’ll need in this exercise are the
Button element and the Drop Down Box element. However
it’s well worth finding your way around this toolbar for future
reference as this is where you’ll insert and deal with a lot of,
if not all the controlling elements of any Excel application.
11
THESE MATERIALS, AVAILABLE FROM WWW.LEARNINGTECHNOLOGIES.AC.UK, MAY BE
USED BY STAFF IN THE POST-16 SECTOR AS FOLLOWS; COLLEGES OF FURTHER
EDUCATION, SIXTH FORM COLLEGES, SPECIALIST COLLEGES, ADULT AND COMMUNITY
EDUCATION INSTITUTIONS AND UK ONLINE CENTRES IN ENGLAND AND WALES ON A NOT
FOR PROFIT BASIS. ALL © RIGHTS RESERVED BY THE ORIGINAL AUTHORS
Adding Drop-Down Boxes and Input Ranges
Drop down boxes in Excel work slightly different than those in Word. There’s
an example of adding one here, and you’ll then have to repeat this for each of
the questions you've added onto your quiz.
Select the Drop Down Box tool on the forms toolbar. You’ll need to draw out
a drop-down box to the size you want. Don’t worry too much about the size
here as you can always resize it later on.
Once you’ve inserted the control, right click on it and select Format Control.
You should see a window like the one below.
3D shading
is purely an
aesthetic
choice.
Question 1 asks What does the acronym HTML stand for?” so start with
that. Sheet 2 is where you’ll be keeping the options for the questions and
also the workings of the system. When you havefinished, you’ll be locking
Sheet 2 and hiding it so everything is kept neatly out of the way. For now
though, select it by using its tab on the bottom left of the screen
Next, you need to enter the options for the first question as below. Place
each option in a separate cell below one-another.
12
THESE MATERIALS, AVAILABLE FROM WWW.LEARNINGTECHNOLOGIES.AC.UK, MAY BE
USED BY STAFF IN THE POST-16 SECTOR AS FOLLOWS; COLLEGES OF FURTHER
EDUCATION, SIXTH FORM COLLEGES, SPECIALIST COLLEGES, ADULT AND COMMUNITY
EDUCATION INSTITUTIONS AND UK ONLINE CENTRES IN ENGLAND AND WALES ON A NOT
FOR PROFIT BASIS. ALL © RIGHTS RESERVED BY THE ORIGINAL AUTHORS
The Question 1 heading
here serves no purpose
within the exercise itself,
it is merely for our
reference and will tell us
which question these
options belong to.
You now need to return to Sheet 1 and go back into the control properties.
Using the controls highlighted below, select the group of cells that contains
the options for the drop-down. In the example above these are A2 to A5.
You should notice how it creates the Input Range for you based on what
you’ve selected. Next fill in Cell link: again you should select a cell on
sheet two which will contain the selected value. A7 on Sheet 2 is a good
selection in this case. The Drop down lines option should be set to 4, as
that is how many options you’re providing.
You’ll find that the cell you’ve specified as the cell link will contain a
number when you’ve pressed OK. The number represents the currently
selected option from the list. For example, the number 1 in the example
above would tell us that Option 1 (Hyper Text Mark-up Language) is
currently selected in the drop down box on Sheet 1. You can then use an
IF Statement to tell the user whether or not they’re right or wrong as
shown later on.
For now, repeat this process for all the other questions using the following
options.
13
THESE MATERIALS, AVAILABLE FROM WWW.LEARNINGTECHNOLOGIES.AC.UK, MAY BE
USED BY STAFF IN THE POST-16 SECTOR AS FOLLOWS; COLLEGES OF FURTHER
EDUCATION, SIXTH FORM COLLEGES, SPECIALIST COLLEGES, ADULT AND COMMUNITY
EDUCATION INSTITUTIONS AND UK ONLINE CENTRES IN ENGLAND AND WALES ON A NOT
FOR PROFIT BASIS. ALL © RIGHTS RESERVED BY THE ORIGINAL AUTHORS
Question 1 Question 6
Hyper-Text Mark-up Language* Silly, Silly Sausage
Hot Tomato, Mustard and Lettuce Server Side Index
Happy Travellers Must Look Server Side Include*
Help! Too Many Llamas! Severe Server Irritation
Question 2 Question 7
Netscape* Yes
Microsoft No
AOL Only when <basefont="3">*
Macromedia Only when <basefont="5">
Question 3 Question 8
Centre the table on the page* HTML 2.0
Centre the contents of the table HTML 1.5*
Turn the table upside down HTML 3.2
Centre the table's background HTML 4
Question 4 Question 9
Server not found Netscape
File not found* Microsoft*
Directory not found AOL
Internet not found Macromedia
Question 5 Question 10
80 and 8080* Centre for Systems Studies
67 and 12 Cascading Style Sheets*
1 and 2 Coloured Slipper Socks
A and B Cascading Style Snippets
This is where the exercise starts to get a little bit complicated. Take the
example below.
This is the layout for question 5. The cells in the first column represent the
options for the question. The highlighted cell above containing the number
1 is the Cell link you specified earlier on. The number 1 shows that on the
first sheet the first option in the drop-down is selection.
Look at the cell containing the number 10 That contains the IF statement
you’re going to be using. The close-up of the formula bar above shows the
code you need. Look at the IF statement in more detail:
IF(B27=1,10,0)
14
THESE MATERIALS, AVAILABLE FROM WWW.LEARNINGTECHNOLOGIES.AC.UK, MAY BE
USED BY STAFF IN THE POST-16 SECTOR AS FOLLOWS; COLLEGES OF FURTHER
EDUCATION, SIXTH FORM COLLEGES, SPECIALIST COLLEGES, ADULT AND COMMUNITY
EDUCATION INSTITUTIONS AND UK ONLINE CENTRES IN ENGLAND AND WALES ON A NOT
FOR PROFIT BASIS. ALL © RIGHTS RESERVED BY THE ORIGINAL AUTHORS
Because it’s a function, it needs to be contained in brackets. For example
IF(arguments). All functions within Excel follow this format. Look at the
arguments.
B27=1, = here you’re providing the criteria which Excel will evaluate
before doing anything. In this example you’re saying that if cell B27 has a
value of 1, do this, otherwise, do something else.
Given the format of the IF statement above, see if you can repeat this
process and create similar statements for the rest of your questions.
Remember that the first number (in this case 1) represents the correct
option in the drop-down field, so if option 4 was correct the IF
statement would read IF(B27=4,10,1).
Because all your IF statements are in one column, you can use the SUM function
to add them all up and present a final score. In the example, all the IF statements
are in the D column, so you’d use the function:
SUM(D1:D45)
You should notice similarities between the SUM and IF functions. All Excel
functions operate inside the same format.
This will keep a running total of the contents of the D column. Basically this
means it’ll keep a running total of the user’s score as they alter the options on the
front page.
The quiz is almost complete. To summarise, you’ve added the question, built in a
mechanism to return answers and added a formula to total up the user’s score
and keep track of it. However, the user isn’t going to see the second worksheet
with the options, formulae and total, so you’re going to add a calculate button to
the first sheet which, when pressed, will return the user’s score based on what
they’ve got selected in the drop down boxes.
The first hurdle you need to tackle is the fact that once you’ve secured this sheet
and locked it, there’s no way you can copy and paste the result from the SUM
function into the first sheet using a macro. So here’s what you do:
On the first sheet, in an out of the way cell (for example Z1 or something
similar) type an equals sign (=) . Now, before clicking away navigate your way
to the cell on the second worksheet that contains the SUM formula you
15
THESE MATERIALS, AVAILABLE FROM WWW.LEARNINGTECHNOLOGIES.AC.UK, MAY BE
USED BY STAFF IN THE POST-16 SECTOR AS FOLLOWS; COLLEGES OF FURTHER
EDUCATION, SIXTH FORM COLLEGES, SPECIALIST COLLEGES, ADULT AND COMMUNITY
EDUCATION INSTITUTIONS AND UK ONLINE CENTRES IN ENGLAND AND WALES ON A NOT
FOR PROFIT BASIS. ALL © RIGHTS RESERVED BY THE ORIGINAL AUTHORS
entered earlier. You should see the cell highlight with a dashed line as shown
below.
Press the Return key and you should now see that the value of the cell on
the first worksheet matches the value of the cell on the second worksheet.
This new cell will update automatically as the cell doing the SUMming
changes. You can now leave the second worksheet alone.
Using the font formatting controls, change the colour of the text in your new
cell so that it matches the background of the exercise and is invisible. This is
so that the workings out can’t be seen by the user. When you lock the
worksheets later on the workings will be completely secure as the user won’t
be able to select them by clicking in the cell.
You’ll be reproducing this on the first sheet below the drop down question and
answer boxes.
To add a button select the button icon on the Forms toolbar and drag one out to
the required size.
Draw out two buttons. You can edit the name by clicking on the
button itself and typing over the default name Excel has given it.
Call one Calculate and the other Reset.
16
THESE MATERIALS, AVAILABLE FROM WWW.LEARNINGTECHNOLOGIES.AC.UK, MAY BE
USED BY STAFF IN THE POST-16 SECTOR AS FOLLOWS; COLLEGES OF FURTHER
EDUCATION, SIXTH FORM COLLEGES, SPECIALIST COLLEGES, ADULT AND COMMUNITY
EDUCATION INSTITUTIONS AND UK ONLINE CENTRES IN ENGLAND AND WALES ON A NOT
FOR PROFIT BASIS. ALL © RIGHTS RESERVED BY THE ORIGINAL AUTHORS
Recording your Macros will be the next step:
By recording a macro you’re recording your actions and a series of steps that are
needed to accomplish a task. Uses of macros are very varied. Some could be
copying data from one sheet to another at the touch of a button, creating a graph
or clearing a series of cells.
Before recording a macro you should plan in your head what you want to
accomplish. The Record Macro tool records every action you take, so if you
make a mistake you could end up having it recorded permanently.
Select Tools > Macro > Record New Macro. You should be presented with
the screen below.
Give the Macro a name. Here you’ve given it the original title of Reset. You can
choose to store a macro in just one workbook as you’ll do here, or in Excel
itself so that you can use it over and over again on different spreadsheets.
Because your macro is only specific to this application you’ll leave the option
as default.
Description is purely a note for your own reference. Shortcut Key allows
you to assign a short-cut key to the macro. These two fields are optional and
not really needed for this exercise.
Once everything is set up click on OK. You’re now ready to record your macro.
First of all have a look at the new floating toolbar that should have appeared:
First of all record a macro which adds a value of 0 to the cell shown below
(just by typing it over the top of whatever is in there).
17
THESE MATERIALS, AVAILABLE FROM WWW.LEARNINGTECHNOLOGIES.AC.UK, MAY BE
USED BY STAFF IN THE POST-16 SECTOR AS FOLLOWS; COLLEGES OF FURTHER
EDUCATION, SIXTH FORM COLLEGES, SPECIALIST COLLEGES, ADULT AND COMMUNITY
EDUCATION INSTITUTIONS AND UK ONLINE CENTRES IN ENGLAND AND WALES ON A NOT
FOR PROFIT BASIS. ALL © RIGHTS RESERVED BY THE ORIGINAL AUTHORS
In the example here, the % symbol is in a different cell to the number. This
makes calculation easier as you’re dealing with whole numbers and not
percentages.
That’s it. The macro will now execute when you click on the button.
To finish off… remember the cell you created earlier with the invisible text that
was a link to the second sheet? The one with the current score in it? You need
to record another value that copies and pastes the value of that cell into the
one that contains your result. Call this macro calculate. Remember to check
your macros are working properly before you move onto the next step.
So far you’ve created a question set, built mechanisms for answering them and
allowed the user to retrieve a score based on how many correct answers they’ve
accumulated.
The last step in this rather lengthy exercise is to lock the workbook, hide the
sheet with the answers and IF statements and secure the file so that its inner
workings can’t be tampered with.
First of all hide the sheet with the workings out by:
Selecting the second sheet using the tabs at the bottom of the window.
Select Format > Sheet > Hide. The sheet is now hidden and not easy to get
back. Therefore it’s imperative that before you do this you make sure
everything is working properly.
Lastly secure the worksheet so that the only thing the end user has access to is
the form controls which you created – the drop down boxes and buttons. To do
this:
18
THESE MATERIALS, AVAILABLE FROM WWW.LEARNINGTECHNOLOGIES.AC.UK, MAY BE
USED BY STAFF IN THE POST-16 SECTOR AS FOLLOWS; COLLEGES OF FURTHER
EDUCATION, SIXTH FORM COLLEGES, SPECIALIST COLLEGES, ADULT AND COMMUNITY
EDUCATION INSTITUTIONS AND UK ONLINE CENTRES IN ENGLAND AND WALES ON A NOT
FOR PROFIT BASIS. ALL © RIGHTS RESERVED BY THE ORIGINAL AUTHORS
Select Tools > Protection > Protect Workbook… to bring up the following
window.
Check both boxes and give the workbook a password. Protecting the
workbook prevents anyone from altering the structure or viewing hidden
worksheets without the correct password.
Lastly protect your main Worksheet so its contents and structure cannot be
altered. This time (making sure the first worksheet is selected) go to Tools >
Protection > Protect Workbook…
Enter an appropriate password, again making sure all the boxes are checked.
Your simple quiz is now complete. Hopefully you can see how Excel form controls
and advanced functions can be put to great use, and how Excel can be much
more than a mathematical package.
19
THESE MATERIALS, AVAILABLE FROM WWW.LEARNINGTECHNOLOGIES.AC.UK, MAY BE
USED BY STAFF IN THE POST-16 SECTOR AS FOLLOWS; COLLEGES OF FURTHER
EDUCATION, SIXTH FORM COLLEGES, SPECIALIST COLLEGES, ADULT AND COMMUNITY
EDUCATION INSTITUTIONS AND UK ONLINE CENTRES IN ENGLAND AND WALES ON A NOT
FOR PROFIT BASIS. ALL © RIGHTS RESERVED BY THE ORIGINAL AUTHORS
Part Three: Using Excel to Create Statistical and
Mathematical Exercises
The Purpose
This exercise uses a combination of Excel’s form controls and graphical data
representation tools to create an interactive version of the Supply and Demand
model often taught in Business Studies programmes.
Setting Up
First you’ll need to create a new workbook for this exercise Your first step is
creating a graph. Later you will add the form controls that can be used to
manipulate this graph.
Sheet 2 is going to control all the working out for this exercise, while Sheet 1
contains the exercise front end and graph controls.
20
THESE MATERIALS, AVAILABLE FROM WWW.LEARNINGTECHNOLOGIES.AC.UK, MAY BE
USED BY STAFF IN THE POST-16 SECTOR AS FOLLOWS; COLLEGES OF FURTHER
EDUCATION, SIXTH FORM COLLEGES, SPECIALIST COLLEGES, ADULT AND COMMUNITY
EDUCATION INSTITUTIONS AND UK ONLINE CENTRES IN ENGLAND AND WALES ON A NOT
FOR PROFIT BASIS. ALL © RIGHTS RESERVED BY THE ORIGINAL AUTHORS
Because you’re only creating simple curves here, you need only two values for
Price and two values for Demand / Quantity. This will allow you to mark two points
on a scatter graph, and draw a simple line between them.
You’ll be using two graphs which you’ll be able to manipulate using form controls,
one for Supply and one for Demand. You will use Excel’s graphing functions to
create graphs.
Now select Insert > Chart. You should be presented with the first step of the
Insert Chart Wizard.
21
THESE MATERIALS, AVAILABLE FROM WWW.LEARNINGTECHNOLOGIES.AC.UK, MAY BE
USED BY STAFF IN THE POST-16 SECTOR AS FOLLOWS; COLLEGES OF FURTHER
EDUCATION, SIXTH FORM COLLEGES, SPECIALIST COLLEGES, ADULT AND COMMUNITY
EDUCATION INSTITUTIONS AND UK ONLINE CENTRES IN ENGLAND AND WALES ON A NOT
FOR PROFIT BASIS. ALL © RIGHTS RESERVED BY THE ORIGINAL AUTHORS
Titles allows you to add labels to the
axes of your chart. In the example, the
X axis represents Demand and the Y
axis represents Price.
22
THESE MATERIALS, AVAILABLE FROM WWW.LEARNINGTECHNOLOGIES.AC.UK, MAY BE
USED BY STAFF IN THE POST-16 SECTOR AS FOLLOWS; COLLEGES OF FURTHER
EDUCATION, SIXTH FORM COLLEGES, SPECIALIST COLLEGES, ADULT AND COMMUNITY
EDUCATION INSTITUTIONS AND UK ONLINE CENTRES IN ENGLAND AND WALES ON A NOT
FOR PROFIT BASIS. ALL © RIGHTS RESERVED BY THE ORIGINAL AUTHORS
On clicking Next you should be
presented with the fourth and final step
of the wizard and select where the new
chart is going to go. In this case you
need it As an object in Sheet1.
Your graph should now be present on Sheet1. At this stage it’s a good idea to
resize your graph using the resizing handles around its edge. Remember you’ve
got to fit two graphs, a number of form controls and some complimentary text on
this sheet.
You’ll need to repeat this process later on to add your second graph, but for now
concentrate on adding the controls for the graph.
First off, make sure the Forms toolbar is visible by selecting View > Toolbars >
Forms if you can’t already see it.
The scrollbar form control is the one you’ll be using and is highlighted above.
Select the scrollbar tool and draw out a small scrollbar on your first sheet. Size
and orientation aren’t too important for now as you can always change these
later.
Current Value reflects the current state of the slider. This is an easy way of
setting the starting value of the control.
23
THESE MATERIALS, AVAILABLE FROM WWW.LEARNINGTECHNOLOGIES.AC.UK, MAY BE
USED BY STAFF IN THE POST-16 SECTOR AS FOLLOWS; COLLEGES OF FURTHER
EDUCATION, SIXTH FORM COLLEGES, SPECIALIST COLLEGES, ADULT AND COMMUNITY
EDUCATION INSTITUTIONS AND UK ONLINE CENTRES IN ENGLAND AND WALES ON A NOT
FOR PROFIT BASIS. ALL © RIGHTS RESERVED BY THE ORIGINAL AUTHORS
Maximum Value is the maximum value the scrollbar will allow. These two values
allow you to set boundaries for your chart and add a level of control to your
simulation.
Incremental change reflects the value change for the scrollbar with each click of
the arrows at either end of the scrollbar
Page change reflects the incremental value change as the mouse is held down
over the scrollbar control.
Cell Link allows you to browse to a cell which will contain the numeric value of
the scrollbar.
Click on the small icon to the right of the cell link field and then browse to Sheet2.
You’ll need to the first Price value to begin with. You’re going to be using two
sliders to control this curve. One will control the height of the curve and one the
gradient. The highlighted cell below (ie the first column) controls gradient.
Once you’ve selected the correct cell, click on the icon highlighted above to return
to the Format control window and click OK to confirm your choices.
Finishing Up
That’s your first slider added. You now need to repeat this process three more
times. In the end you should have four scrollbar controls linked to the four cells
highlighted above. You need:
Add a title and some sample questions to your chart. For example:
“What happens when price increases?” and “What factors can affect demand
aside from price?”. If you wish you can use the question and answer model from
the previous exercise to make these interactive.
The rest of the work on this sheet is purely aesthetic. One thing you may wish to
do is hide the gridlines using the following control on the Forms toolbar.
24
THESE MATERIALS, AVAILABLE FROM WWW.LEARNINGTECHNOLOGIES.AC.UK, MAY BE
USED BY STAFF IN THE POST-16 SECTOR AS FOLLOWS; COLLEGES OF FURTHER
EDUCATION, SIXTH FORM COLLEGES, SPECIALIST COLLEGES, ADULT AND COMMUNITY
EDUCATION INSTITUTIONS AND UK ONLINE CENTRES IN ENGLAND AND WALES ON A NOT
FOR PROFIT BASIS. ALL © RIGHTS RESERVED BY THE ORIGINAL AUTHORS
You may also wish to make sheet2 hidden by selecting it, followed by Format >
Sheet > Hide. You can also protect the workbook, making it totally secure by
selecting Tools > Protection > Protect Workbook and entering a password
twice. Protecting and securing workbooks and worksheets is covered in more
detail in the previous exercise.
25
THESE MATERIALS, AVAILABLE FROM WWW.LEARNINGTECHNOLOGIES.AC.UK, MAY BE
USED BY STAFF IN THE POST-16 SECTOR AS FOLLOWS; COLLEGES OF FURTHER
EDUCATION, SIXTH FORM COLLEGES, SPECIALIST COLLEGES, ADULT AND COMMUNITY
EDUCATION INSTITUTIONS AND UK ONLINE CENTRES IN ENGLAND AND WALES ON A NOT
FOR PROFIT BASIS. ALL © RIGHTS RESERVED BY THE ORIGINAL AUTHORS