Absolute referencing
You may want to multiply a column of numbers by a fixed amount. A column of
figures might show amounts in US Dollars. To convert these amounts to Euros it is
necessary to multiply each dollar amount by the exchange rate. $US10.00 would be
multiplied by 0.75 to convert to Euros, in this case Eur7.50. The following example
shows how to input an exchange rate and use that rate to convert amounts in a
column form USD to Euros.
1) Input the exchange rate Eur:USD (0.75) in cell D1. Enter amounts (in USD)
into cells D2, D3 and D4, for example 10, 20, and 30.
2) In cell E2 type the formula =D2*D1. The result is 7.5, correctly shown.
3) Copy the formula in cell E2 to cell E3. The result is 200, clearly wrong! Calc
has copied the formula using relative addressing - the formula in E3 is =D3*D2
and not what we want which is =D3*D1.
4) In cell E2 edit the formula to be =D2*$D$1. Copy it to cells E3 and E4. The
results are now 15 and 22.5 which are correct.
The $ signs before the D and the 1 convert the reference to cell D1 from relative to
absolute or fixed. If the formula is copied to another cell the second part will always
show $D$1. The interpretation of this formula is “take the value in the cell one
column to the left in the same row and multiply it by the value in cell D1”.
170 OpenOffice.org 3.3 Calc Guide
Komentáře k této Příručce