This post will guide you how to use Google Sheets **COLUMNS **function with syntax and examples.

Table of Contents

**Description**

The Google Sheets COLUMNS function returns the number of columns in an Array or a reference. For example, COLUMNS(B1:D4) returns 3, since the range B1:D4 contains 3 columns.

The COLUMNS function can be used to get the count of columns in a given cell range in google sheets. The purpose of this function is to get the number of columns in an array range or cell reference and the returned value is a number that representing the COLUMNS.

The COLUMNS function is a build-in function in Google Sheets and it is categorized as a Lookup function**.**

**Syntax**

The syntax of the COLUMNS function is as below:

**=COLUMNS (array)**

**Where** the COLUMNS function arguments are:

**Array**-This is a required argument. A reference to a cell or a range of cells.

Notes:

- Array can be a cell range or a reference that containing a group of cells
- If you want to get column numbers, just see also COLUMN function.
- If you want to get row numbers, just see also ROW function.
- If you want to get the number of rows in given array or cell range, just see also ROWs function.

## Google Sheets COLUMNS Function Examples

The below examples will show you how to use google sheets COLUMNS to return the number of columns in a given range.

**#1 **To get the number of columns in the reference **D1:F5**, just using the following excel formula:

=COLUMNS(D1:F5)

**#2** Using COLUMNS function to get a column count for a given array constant “{1,2,3}”, just using the following formula:

=COLUMNS({1,2,3})