Returns the number of columns in an array or reference.
Syntax
COLUMNS(array)
Array is an array or array formula, or a reference to a range of cells for which you want the number of columns.
Examples
COLUMNS(A1:C4)
equals 3
COLUMNS({1,2,3;4,5,6})
equals 3