The address function is hardly exciting. It requires a number of
parameters to generate the text of a cell address.
- Parameter 1: this is the row number. For cell G5, we should
specify 5 because G5 is on row 5.
- Parameter 2: this is the column number. Although in a cell
address the column is alphabetical, we can easily translate them
to numbers. ``A'' is column 1, ``B'' is column 2, and etc.
As a result, cell G5 has a column number of 7.
- Parameter 3: A number to indicate relative/absolute modes.
The default value of 1 is okay for our assignment.
- 1 for absolute for both row and column
- 2 for absolute for row only
- 3 for absolute for column only
- 4 for relative for both row and column
- Parameter 4: A number to indicate the address form.
The default of 1 is okay for our assignment
- 1 for the usual cell address format (alphabetical column,
numeric row)
- 0 for an alternate address formate using the
R1C1
notation for cell A1.
- Parameter 5: this is the name of the worksheet. This is only
necessary when we refer to cells that are on a different
worksheet (from the cell containing the formula).
Note that the ``address'' function only returns the text of a
cell address. It is great for viewing, but it does not actually
get the value of the cell.
As an example, we can specify the address of
cell A21 of sheet ``Monthly'' by
=address(21, 1,,, "Monthly").
However, recall that we already how column D of worksheet ``Annual''
listing the useful row numbers of ``Monthly''. This means we can use
=address(D2, 1,,, "Monthly") as the formula of cell A2 of
``Annual''.
Copyright © 2005-11-10 by Tak Auyeung