1. Home
  2. Functions
  3. Lookup and reference
  4. COLUMNS

COLUMNS function

Returns the number of columns in a range or array.

Syntax

=COLUMNS(array)

Arguments

ArgumentRequiredDescription
arrayRequiredA range or array

How to use COLUMNS

COLUMNS takes 1 required argument. Type =COLUMNS( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.

Examples

Each result below was calculated by the SheetsBat formula engine.

=COLUMNS({1,2,3;4,5,6})Result 3
=COLUMNS(A1:C5)Result 3

Every formula, right in your browser

SheetsBat calculates 536 functions, with charts, pivot tables and live collaboration. Free to start.