Article updated on January 25, 2018

The COLUMNS function allows you to calculate the number of columns in a cell range.

The example above shows that cell range C2:J2 has 8 columns.

Excel Function Syntax



array Required. A cell range for which you want to determine the number of columns.


The COLUMNS function also calculates the number of rows in an array.

=COLUMNS({1,2,3;4,5,6;2,3,4}) returns 3.

The array has three columns. The , (comma) character is a column delimiting character in an array.