Using the Excel COLUMNS Function

Summary
The Excel COLUMNS function is used to return the number of columns in a reference range. For example, COLUMNS (A1:B1) would return 2 since the range A1:B1 contains two columns.Syntax
=COLUMNS (array)Syntax Breakdown
ArrayRequired. The argument can be an array, array formula, or a reference to a range of cells for which you want to find the count of columns.
Usage Notes
COLUMNS returns the count of columns in a range.Use the COLUMN function to return the number of a specific column.