Google Sheets COLUMNS Function

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)

google sheets columns function1

#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})

google sheets columns function1

 

Related Posts

Google Sheets FACT Function

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. ...

Google Sheets EVEN Function

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 ...

Google Sheets COUNTBLANK Function

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 ...

Google Sheets DEGREES Function

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 ...

Google Sheets COSH Function

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 ...

Sidebar