COLUMNS

Purpose

  • Returns the number of columns in a range of cells

Example

COLUMNS

  • Here is a screenshot, for reference:

COLUMNS

  • Notice that:
    • Since the range referenced (i.e. the highlighted cells) is 2 columns wide, 2 is returned
    • The number of rows that the range spans (3, in this case) is irrelevant
    • The COLUMNS function ignores the contents of the cells referenced - it simply counts how many rows are in the range you specify

Syntax

  • =COLUMNS(array)

Arguments

  • array
    • This is a range of cells in question
    • If the array encompasses 5 columns (e.g. A1:E1000), the number 5 will be returned

External Links