Using the Excel COLUMNS Function
SummaryThe 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.
Required. 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 NotesCOLUMNS returns the count of columns in a range.
Use the COLUMN function to return the number of a specific column.