Home » Excel-Built-In-Functions » Excel-Lookup-And-Reference-Functions » Excel-Columns-Function

# The Excel COLUMNS Function

Related Function:

ROWS function## Function Description

The Excel Columns function receives an Excel range and returns the number of columns that are contained within the range.

The syntax of the function is:

COLUMNS( array )

Where the array argument is the Excel range for which you want to return the number of columns.

## Columns Function Examples

The following spreadsheet shows three simple examples of the Excel Columns function.

Formulas: | A |
---|
1 | =COLUMNS( B1 ) |
---|
2 | =COLUMNS( B1:E5 ) |
---|
3 | =COLUMNS( 1:1 ) |
---|
| Results: |

Note that the above functions were calculated in Excel 2010. Therefore, the formula in cell A3 (which returns the number of columns in the whole of row 1 of the spreadsheet) returns the value **16,384**, as this is the number of columns in Excel 2010. If this example were run in Excel 2003, it would return the number **256**.

For further information on the Excel Columns function, see the Microsoft Office website.