The COLUMN function returns the column number, and the result is a cell reference. Learn more about the function.

**Syntax**

`=COLUMN(cell_reference)`

**Arguments**

The function uses one optional argument: the cell reference, for which you want to find the column number. Reference can be empty, a single cell, or a range of cells.

## COLUMN function examples

Here is a few examples to get the column number of a cell or a range of cells using the COLUMN function:

You can use the function without an argument. In this case, it will return the column number of the cell that contains the formula. For example, type the following formula in cell B2. The result is 2 since B2 is the second column in your Worksheet.

`=COLUMN(B2) = 2`

Following the logic above, COLUMN(B10) returns 2.

### Using a single-cell reference

If the argument is a single cell, COLUMN will return the given column number:

```
=COLUMN(B1) = 2
=COLUMN(D1) = 4
```

### What if the target cell contains a formula?

In the example, we use the COLUMN function for cell B10 without an argument, and the cell contains a value, for example, 33.

=COLUMN() returns 2 in cell B10; the result is a cell reference, not the value in B10!

### COLUMN function and Dynamic arrays

You can use a range as an argument. The result will be different depending on your Excel version.

**Formula:**

`=COLUMN(E1:G1) //returns {5, 6 , 7}`

In Excel365, the formula returns an array, and the result is a horizontal range of cells {5, 6, 7} that spills into four cells since this version fully supports dynamic array formulas. In other Excel versions, the formula returns with a single cell reference, E1.

### Using the @ operator

If you want to return a single value from the entire range in Microsoft 365, use the “@” operator. The “@” operator shows a single value instead of the array that contains all values.

**Formula:**

`=@COLUMN(E1:G1) = 5`

**Additional resources:**

**Related formulas**