COLUMNS and COLUMN are two different functions in Google Sheets. Here I’m simply detailing you how to use COLUMNS function in Google Sheets. But I’ll be back with another tutorial where you can learn the advanced use of Google Sheets Columns function.
Then what is the difference between the functions Column and Columns? First learn the use of Columns then I’ll explain you the difference.
Learn How to Use of Columns Function in Google Sheets
Purpose:
The purpose of Google Sheets Columns function is to return the number of columns in a range.
Syntax:
COLUMNS(range)
Example to Columns Function:
See the formula used on the screenshot. Here the range is A1:B7 and there are two columns Column A and B. So the formula returns 2.
See another formula.
=COLUMNS(A1:D5)
Can you guess the result of this formula? Of course it returns 4 since there are four column numbers in the range. They are columns A, B, C and D.
That means the Columns function in Google Sheets returns the number of columns in an array irrespective of the values in that columns. The columns can be filled with values or empty cells. It doesn’t affect the result.
The Difference Between COLUMN and COLUMNS Functions in Google Sheets
You have already learned how to use Columns function in Google Sheets. Similarly I’ve already a post on Column function. Still here is the comparison.
- Columns returns total number of columns in a referred range.
- Column returns the column number of a referred cell.
Example to Column.
=COLUMN(C1)
This formula returns 3 as C is the third column in the Sheet. You can also refer a range in COLUMN to return multiple column numbers. See one example.
=ArrayFormula(COLUMN(C1:E1))
This formula returns column number 3, 4, 5 in separate cells.
You May Like: Learn ArrayFormula Use in Google Sheets
That’s the difference between COLUMNS and COLUMN functions in Google Sheets.
You can use both columns and column in advanced use. Below is one example to the advanced use of Column.
Column Function Advanced Use: How to Expand Count Results in Google Sheets Like Array Formula Does
But for the advanced use of COLUMNS I’ve no tutorial so far. I’ll come back with one and post the link below soon. Enjoy!