COLUMNS function

Returns the number of columns in an array or reference.

Syntax

COLUMNS(array)

Argument

Description

array

An array or array formulaA single formula that performs multiple calculations and then returns either a single result or multiple results. Array formulas act on two or more sets of values, known as array arguments. Each array argument must have the same number of rows and columns. To return multiple results, the formula must be entered into multiple cells.

When you enter an array formula by pressing +RETURN, Excel automatically encloses the array formula between braces ( { } ).
, or a reference to a range of cells for which you want the number of columns.

Example

To make the following example easier to understand, you can copy the data to a blank sheet and then enter the function underneath the data. Do not select the row or column headings (1, 2, 3... A, B, C...) when you copy the sample data to a blank sheet.

1
2
3
AB
FormulaDescription (Result)
=COLUMNS(C1:E4)Number of columns in the reference (3)
=COLUMNS({1,2,3;4,5,6})Number of columns in the array constant (3)
Rate this content:
Not helpfulSomewhat helpfulHelpfulVery helpfulSolved my problem 
 
Share your feedback about this topic