Handout MMDA04 1 Spreadsheet good and bad practice examples
Handout MMDA04 1 Spreadsheet good and bad practice examples
You will be able to go through the examples shown on the slides yourself, to see the points being demonstrated
Contents description
Information this sheet, referred to in slide 'workbook design (2)'
bad practice totals exercise 1 in slide 'use of formulae (2)'; exercise 2 in 'use of formulae (3)'
good practice totals as above, demonstrating the preferred way of doing both
autofill referred to in slide 'quality assurance (3)'
cell formats referred to in slide 'quality assurance (4)'
sorting tables referred to in slide 'quality assurance (7)'
Exercise 1:
Inflation has changed. You need to increase your inflation multiplier to 1.2 in year 2, 1.3 in year 3
How do you do this?
Exercise 2:
1. insert a new row below ‘Other’ (either highlight row 10 and ‘insert above’ or highlight row 9 and ‘insert below’)
2. insert ‘Extras’ into new cell A10
3. insert the value 4,000 into new cell B10
4. What has happened to your total in cell B11?
Page 1
bad practice totals
Page 2
good practice totals
Budget Projection
Inflation multiplier 1.1 1.15
Exercise 1:
Inflation has changed. You need to increase your inflation multiplier to 1.2 in year 2, 1.3 in year 3
How do you do this?
Exercise 2:
1. insert a new row below ‘Other’ (either highlight row 10 or 11 and ‘insert above’ or highlight row 9 or 10 and ‘insert below
2. insert ‘Extras’ into new cell A11
3. insert the value 4,000 into new cell B11
4. What has happened to your total in cell B12?
NOTE exercise 1: as well as referring to a cell that you can change (rather than hard-coding into the table like the bad exa
NOTE exercise 2: if you then delete the row you inserted, the spreadsheet resets the sum formula to B6:B9, so beware of
Page 3
good practice totals
ding into the table like the bad example), it is often preferable to ‘anchor’ with $ signs
m formula to B6:B9, so beware of this!
Page 4
autofill
Company Year Value 1 Value 2
CompanyA 2018 0.5719954 0.247778866
CompanyA 2019 0.665544068 0.525824347
CompanyA 0.840838319 0.124220929
CompanyB 0.550651087 0.622679704
CompanyB 0.528820239 0.213947371
CompanyB 0.323771709 0.330139518
CompanyC 0.664679348 0.542123132
CompanyC 0.21097607 0.447369928
CompanyC 0.043514633 0.02577885
Exercise 1:
highlight cells B2 and B3
pull the cells down to B10 to autofill (or click the square at the bottom of the selected cells)
… this is not what you want for this data set – look at what your rows represent (3 different companies, each with year 201
Exercise 2:
Persons A-E all started on the same date
pull the value for cell B20 down to cell B24
what has happened to your dates?
Page 5
autofill
Page 6
cell formats
… unfortunately the spreadsheet thinks you are entering a date, and changes it for you
Another example is if you have any coding system that includes numbers and the letter E
Try typing any combination of numbers with the letter E in the middle:
Other examples
It is common practice to enter data on age ranges
Exercise 1: enter the categories 0-4, 5-9, 10-14, 15-19 in cells B7 to B10 below
also beware that spreadsheets keep the cell format when you copy and paste that cell elsewhere
and note that spreadsheets won’t sort those categories in the way you logically want them sorted
exercise: select the cells B36-B41, sort them (either right click, sort ascending, or Data→sort→)
Age
0-4
5-9
10-14
15-19
20-24
25-29
Spreadsheets don’t realise these are age groups, and that ages 5-9 should come before ages 10-14
Instead they just recognise that the number 1 comes before the number 5
Page 7
cell formats
Page 8
sorting tables
Exercise 1:
select cell F2
sort the column by decreasing order (Data > sort descending)
What has happened to your data?
Exercise 2:
select cell E15
sort the column by decreasing order (Data > sort descending)
what has happened to your data now?
Exercise 3:
select cells B30 to F34
sort the column by decreasing order (Data > Sort > choose to sort descending by Height (inches))
what has happened to your data now?
Page 9
sorting tables
Page 10