The COLUMNS function returns the number of columns in a reference or array.
For example:
COLUMNS(F1..H10) returns 3
COLUMNS({1, 2; 9, 8}) returns 2
If you have created a named range called myarea that refers to the range A1..D4, then
COLUMNS(myarea) returns 4.
See also: