COLUMNS()

Syntax. COLUMNS(array)

Definition. This function returns the number of columns of an array or cell reference.

Arguments

  • array (required). An array constant or a reference to a cell range

Background. If you try to use a discontiguous range as the argument, you will get the error message, “You’ve entered too many arguments to the function.” If you enclose these arguments in additional parentheses, you get the #REF! error. If the range is defined by intersections and the intersection is empty, you get the #NULL! error.

Array constants are numbers or text that you must enclose in braces. Rows are separated by semicolons, and columns are separated by commas. The simple expression {1;2;3;4} is interpreted as a single column, as shown by the result ...

Get Microsoft® Excel® 2010 Formulas & Functions Inside Out now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.