COLUMN

Formulas / COLUMN
Return the column number for a reference.
COLUMN([reference])
  • reference - [OPTIONAL] cell or range of cells for which to return the column number

Examples

  • =COLUMN(A1)

    The function returns 1 because it is a single cell reference. This means that it gives the column number of the cell that is specified in the argument, in this case A1.

  • =COLUMN(C1)

    The function returns 3, because C is the third column in a Sourcetable spreadsheet. This means that the function returns the column number for the cell that is specified in the argument, in this case, C1.

  • =COLUMN()

    The function returns 4 in cell D6 because the formula is set to return a single value. This means that it gives the column number of the cell from which the formula is called. In this case, the formula is called from the fourth column, so it returns the number 4.

  • =COLUMN(E4:G6)

    The function returns the array {5,6,7} because it takes a range argument and returns the column numbers for that range. This means that it gives the column numbers for each of the cells in the range specified in the argument, in this case E4:G6. Since E is the fifth column, F is the sixth column, and G is the seventh column, the function returns the array {5,6,7}.

Summary

The COLUMNS function returns the number of columns in a data set or reference by taking an array argument and a reference argument. The array argument is required and must be an array or array formula, while the reference argument is a range of cells to count the number of columns in.

  • The COLUMN function returns the column number for a reference cell, when no reference is given the cell containing the formula is used.
  • The reference argument for the COLUMN function can be either a single cell address or a range of cells.
  • To get row numbers, use the ROW function and to get column numbers, use the COLUMNS function.
  • To lookup a column in a table, see the MATCH function.


Frequently Asked Questions

What does the COLUMN function do?
The COLUMN function returns the column number of a cell reference.
What is the COLUMN function useful for?
The COLUMN function is useful for locating the column number of a cell reference.
What argument does the COLUMN function take?
The COLUMN function takes a reference argument, which can be a single cell address or a range of cell addresses. The reference argument can also be omitted.
What happens when the reference argument is omitted?
The COLUMN function will return the column number of a cell reference if no reference is provided.
What is the COLUMN function?
The COLUMN function is a built-in function in Sourcetable that returns a column of data.
How can the COLUMN function be used?
The COLUMN function can be used as a worksheet function and used in formulas.

Make Better Decisions
With Data

Analyze data, automate reports and create live dashboards
for all your business applications, without code. Get unlimited access free for 14 days.