Spreadsheet - Magic Squares

Task

Create a spreadsheet that checks is an array of 9 numbers is a magic square.

Description

A magic square is a 3x3 grid of numbers in which each row, each column and each major diagonal adds up to the same total. Here is an example:

2 7 6
9 5 1
4 3 8

You can quickly verify that:

  • The three rows each add up to 15 (2 + 7 + 6 = 15; 9 + 5 + 1 = 15; 4 + 3 + 8 = 15).
  • The three columns each add up to 15 (2 + 9 + 4 = 15; 7 + 5 + 3 = 15; 6 + 1 + 8 = 15).
  • The two diagonals each add up to 15 (2 + 5 + 8 = 15; 4 + 5 + 6 = 15).

Therefore this is a magic square.

Instructions

(a) Create a new Excel spreadsheet and save it as "Magic Squares.xls".

(b) Create a region on the spreadsheet that allows you to type in a magic square.

(c) Create a number of checks to see if it is a magic square.

(d) Use your sheet to work out which of these are magic squares and which are not.

4 2 9
8 6 1
3 7 5
9 2 4
0 5 10
6 8 1
10 0 12
8 7 6
3 14 4
11 6 7
4 8 12
9 10 5
4 3 2
-1 5 6
7 2 1
5 4 6
6 5 4
4 6 5
55 30 15
10 50 40
35 20 45
49 22 31
16 34 52
37 46 19

Hints

You might like to work out what the square's magic number is supposed to be first, by adding all the numbers together and dividing by three.

Page tags: activity ict spreadsheet
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License