Exceljet

Quick, clean, and to the point

Excel COLUMNS Function

Excel COLUMNS function
Summary 

The Excel COLUMNS function returns the count of columns in a given reference. For example, COLUMNS(A1:C3) returns 3, since the range A1:C3 contains 3 columns.

Purpose 
Get the number of columns in an array or reference.
Return value 
Number of columns
Syntax 
=COLUMNS (array)
Arguments 
  • array - A reference to a range of cells.
Usage notes 

Use the COLUMNS function to get the column count for a given reference or range. For example, there are 6 columns in the range A1:A10, so:

=COLUMNS(A1:F1) // returns 6

The range B1:D5 contains 3 columns:

=COLUMNS(B1:D5) // returns 3

You can also use the COLUMNS function to get a column count for an array constant:

=COLUMNS({1,2,3,4,5}) // returns 5

Notes

  • Array can be a range or a reference to a single contiguous group of cells.
  • Array can be an array constant or an array created by another formula.
Excel foundational video course
Excel Pivot Table video training course
Excel formulas and functions video training course
Excel Shortcuts Video Course
Excel Charts video training course
Video training for Excel Tables