Multiplication Table

We're going to create a multiplication table on a spreadsheet (Calc or Excel). Each cell of the table will be filled with a value coming from the multiplication of the corresponding row and column headers.

First of all, let's prepare the row and column headers, filling them with integer values from 1 to 10.

In order to do this, we write a 1 in cell A1 and drag it right to cell J1 first, then drag down to cell A10.

Now we must insert the formulas to compute the products. Obviously, we're not going to write "by hand" the formulas cell by cell to fill the whole table. We would like to write one and then copy and paste it (by dragging) in all the other cells. While doing this, we must ensure that the formula be correctly pasted.

Let's try to put in B2 the formula that computes the product between the column header (B1) and the row header (A2), and then drag it as just said.

As shown in the figure above, the computed results are not the ones expected. This happens because the references we have put in the formula are relative; so, when the content of cell B2 is copied in cell C2, the formula =B1*A2 becomes =C1*B2.

To further clarify: since cell B2 contains a reference to the cell right on top of it (namely B1) and a reference to the cell at its left (namely A2), in cell C2 the same references are "translated" into C1 (that is, the cell right on top of C2) and B2 (that is, the cell at the left of C2).

How can we prevent Calc from behaving like this?
We must use the symbol $ to "block" the references (with respect to the row or column index, as appropriate).

The solution is left to the student.

The height of the rows and the width of the columns can be adjusted to make the cells assume the shape of a square. At last, borders can be added to the cells.