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

## 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})` Related Posts

This post will guide you how to use Google Sheets FACT function with syntax and examples. Description The Google Sheets FACT function returns the factorial of a given number.  The factorial of a given number is equal to 1*2*3…* number. ...

This post will guide you how to use Google Sheets EVEN function with syntax and examples. Description The Google Sheets EVEN function rounds a given number up to the nearest even integer. You can use the EVEN function to return ...

This post will guide you how to use Google Sheets COUNTBLANK function with syntax and examples. Description The Google Sheets COUNTBLANK function use to count the number of empty cells in a range of cells. You can use the COUNTBLANK ...

This post will guide you how to use Google Sheets DEGREES function with syntax and examples. Description The Google Sheets DEGREES function converts radians into degrees. And it will return a numeric value. For examples, if you pass the PI() function into ...

This post will guide you how to use Google Sheets COSH function with syntax and examples. Description The Google Sheets COSH function returns the hyperbolic cosine of a given angle. The purpose of this function is used to get hyperbolic ...

This post will guide you how to use Google Sheets COS function with syntax and examples. Description The Google Sheets COS function returns the cosine of a given angle. If you want to supply an angle to COS function in ...

This post will guide you how to use Google Sheets COMBINA function with syntax and examples. Description The Google Sheets COMBINA function returns the number of combinations for a given number of items and it includes repetitions. You can use ...