Writing Safer Spreadsheets

If you really want to use a spreadsheet, then it MUST be designed and documented. The steps you have to go through are those that a compiler program would use in creating a spreadsheet from a set of equations.

You must also provide a description of what you have done so that anyone wishing to use or check the spreadsheet know exactly what it is supposed to do. unlike a program written in a proper programming language it is not practical for anyone to work this out from the spreadsheet itself. This documentation is at least as important as the spreadsheet.

A useful guide to the steps you must go through is the input form for our web based modelling tool. This was developed from a tool which created spreadsheets automatically. Each section of the form represents a set of actions which you must carry out. You should also read the section on how to construct models properly.

The the things which you must do specifically to create a spreadsheet are as follows.

Model Formulation

You have now defined your model.

Design the Spreadsheet

This involves deciding which variablea and parameters go in which cells.

It is up to you how you wish to arrange the cells on the spreadsheet matrix. However the following guidelines should be followed.

Go to your list of variables and parameters and write beside each the name of the cell in which it is stored. Check again that numeric and label cells do not conflict.

You may find it helpful to plan the layout of the sheet on squared paper. DO NOT TRY TO CREATE IT ON THE COMPUTER.

Translate the Equations

This is an essentially mechanical task of translating your formulas so that the names of variables and parameters are replaced by the names of the cells. Bear in mind that you are much less able to do this job reliably than a computer can.

Create and Check your Spreadsheet

Only now can you go to the computer and type in each cell contents. If you find that you have made a mistake, e.g. tried to use the same cell for both a formula and a label, then you MUST return to the previous stage, correct your design. and update your lists. DO NOT try to correct it `on the fly'!

Go though the sheet and check each cell contents against you list. This is very tedious, but it is much easier to do it now, immediately after you have created the sheet than to come back to it later.

Solve a test problem to which you know the answer.

Complete your Documentation

This consists of: Once again - this is as important as the spreadsheeet itself. If the spreadsheet is being used to solve, e.g. a design workshop problem, and you do not provide this documentation, then the marker is entitled to assume that your answers are meaningless, as he has no way of checking them. He is not going to waste his time examining the contents of cells in your spreadsheet. You could in principle be given zero marks for the entire exercise. Be warned!