COLUMNS Function Examples – Excel, VBA, & Google Sheets

Written by

Editorial Team

Reviewed by

Steve Rynearson

Last updated on November 6, 2023
Download Example Workbook

Download the example workbook

This Tutorial demonstrates how to use the Excel COLUMNS Function in Excel to count the number of columns.
COLUMNS Main Function

COLUMNS Function

The COLUMNS Function returns the number of columns in a given cell reference.

=COLUMNS(T4)

COLUMNS EX 01

COLUMNS Function – Cell Range

You can also enter a cell range and it will return the total number of columns in the range.

=COLUMNS(R3:U7)

COLUMNS EX 02

COLUMNS Function – Array Constant

You can also count the number of columns in a given array constant.

=COLUMNS({1,2,3,4,5,6,7,8,9})

COLUMNS EX 03

COLUMNS Function in Google Sheets

The COLUMNS Function works exactly the same in Google Sheets as in Excel:

COLUMNS Google Function

AI Formula Generator

Try for Free

Excel Practice Worksheet

practice excel worksheet

Practice Excel functions and formulas with our 100% free practice worksheets!

  • Automatically Graded Exercises
  • Learn Excel, Inside Excel!

Free Download

Return to List of Excel Functions