32 1a: Basic mathematical techniques ⏐ Part A Basic mathematics
You may have noticed a problem. While the formula in cell C7 is fine – it multiplies January sales by 0.6 (the 1
month ratio stored in cell C31) – the remaining formulae are useless, as they
refer to empty cells in row 31. This
is what the spreadsheet would look like (assuming, for now, constant sales of $42,000 per month).
This problem highlights the important distinction between
relative cell references and absolute cell references.
Usually, cell references are
relative. A formula of =SUM(B7:B9) in cell B10 is relative. It does not really mean 'add
up the numbers in cells B7 to B9
'; it actually means 'add up the numbers in the three cells above this one'. If this
formula was copied to cell C10 (as we will do later), it would become =SUM(C7:C9).
This is what is causing the problem encountered above. The spreadsheet thinks we are asking it to
'multiply the
number two up and one to the left by the number twenty-four cells down
', and that is indeed the effect of the
instruction we have given. But we are actually intending to ask it to
'multiply the number two up and one to the left
by the number in cell C31
'. This means that we need to create an absolute (unchanging) reference to cell C31.
Absolute cell references use
dollar signs ($). A dollar sign before the column letter makes the column reference
absolute, and one before the row number makes the row number absolute. You do not need to type the dollar
signs – add them as follows.
(a) Make cell C7 the active cell and press F2 to edit it.
(b) Note where the cursor is flashing: it should be after the 1. If it is not move it with the direction arrow
keys so that it is positioned somewhere next to or within the cell reference C31.
(c) Press F4.
The
function key F4 adds dollar signs to the cell reference: it becomes $C$31. Press F4 again: the reference
becomes C$31. Press it again: the reference becomes $C31. Press it once more, and the simple relative reference
is restored: C31.
(a) A dollar sign
before a letter means that the column reference stays the same when you copy the
formula to another cell.
(b) A dollar sign
before a number means that the row reference stays the same when you copy the
formula to another cell.