COLUMNS

Formulas / COLUMNS
Get the count of columns in a given reference.
COLUMNS(array)
  • The array argument - required, an array or array formula or a cell range with the number of columns

Examples

  • =COLUMNS(A1:F1)

    The COLUMNS function is used to return the number of columns in a specified range of cells. This example returns 6 because there are 6 columns in the range A1:F1.

  • =COLUMNS(A1:Z100)

    The COLUMNS function can also be used to return the number of columns in a larger range of cells. This example,returns 100 because the range A1:Z100 contains 100 columns.

  • =COLUMNS({1,2,3,4,5})

    The COLUMNS function can also be used to return the number of cells in an array constant. This example returns 5 because COLUMNS takes an array constant and returns the count of cells in the array.

  • =COLUMNS(range)*ROWS(range)

    This example returns the total number of cells in the range because ROWS returns the total number of cells and range returns the total number of columns.

Summary

The COLUMNS function returns the number of columns in a data set or reference, taking an array argument as required. It returns a number and can be used with an array or array formula.

  • The COLUMNS function takes one argument called array and is used to count the number of cells in a range.
  • The COLUMNS function can work with other functions to get the total number of cells.


Frequently Asked Questions

What is the COLUMNS function?
The COLUMNS function is a function in Sourcetable that returns the number of columns in a reference or array.
What is the argument for the COLUMNS function?
The argument for the COLUMNS function is an array.
Is the array argument required?
Yes, the array argument is required.
What type of array is accepted for the argument?
The array argument can be either an array or an array formula.
What does the array argument reference?
The array argument must reference a range of cells in order to count the number of columns.

Make Better Decisions
With Data

Analyze data, automate reports and create live dashboards
for all your business applications, without code. Get unlimited access free for 14 days.