COLUMNS Function in Excel: How Many Columns in a Range

⏱ 1 min readUpdated 28 September 2026

LookupLevel: IntermediateAvailable in: Excel 2007+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. Related functions

COLUMNS counts columns in a range — useful for dynamic column numbers and checks.

Syntax

=COLUMNS(array)
Argument What it means
array Range or array.

Examples

Example 1

=INDEX($B2:$M2, COLUMNS($B2:B2))

Walk across a row as you fill right.

COLUMN · ROWS

📚 Part of the free Excel course: Beginner → Expert · Try it in the Formula Lab or ask the AI Helper.

✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free · AI can be wrong