Lookup

How many columns a block covers

Definition

Counting how many columns sit in a range means giving COLUMNS that range.

Syntax

=COLUMNS(array)

Arguments

Argument Meaning
array The range whose column count you need, such as B3:E3.

Worked example

A week strip stores markers at both ends of B3:E3.

B C D E
1 1

Formula: =COLUMNS(B3:E3)

Result: 4. B through E is four columns.

Practice

Cells A1 and F1 each hold 1. In B2, write a formula that returns how many columns are in A1:F1.

  1. In B2, write a COLUMNS formula for A1:F1.
Step 1 of 2
Formulas here use English function names, such as SUM, and a period as the decimal separator, in every language.
Loading the sheet…

Related functions

COLUMNS is the function that counts the columns in that range.

Common mistake

Using COLUMN, as in =COLUMN(B3:E3): COLUMN then returns only the first column number, 2, instead of the count 4.

Related functions

These links are related functions.