macosapple-numbersapple-numbers-formula

Apple's Numbers app: How to use current column number to get some cell on certain row


Preconditions

I can get only the current column number by formula =COLUMN(), that by the lack of argument gives me it, in the cell it's written.

Objectives

I want to use it for selecting a cell in some row.
It must be something like:

=COLUMN()$3

Which means - select the cell on 3d row and current column of the cell the function is in.

P.S
But this type of syntax above is invalid
Question is present here due to the lack of quality documentation on apple's developer's discussions and other resources


Solution

  • The COLUMN function does accept an argument but when no argument is provided, COLUMN uses the cell that contains the formula.

    COLUMN returns a number. For a cell in column B, =COLUMN() will return 2. A valid cell address string uses letters for the column.

    The ADDRESS function is used to construct a cell address string (e.g. "B3")). =ADDRESS(3,COLUMN()) will create an address for row 3 for the same column.

    The INDIRECT function will retrieve the content of a cell for a given cell address, e.g. INDIRECT(ADDRESS(3,COLUMN())).

    From within Numbers, the 'Help' -> 'Formula and Functions Help' menu should open the Formulas and Functions Help guide. The functions discussed are all in the "Reference Functions" section which can be navigated to from the "Table of Contents".