The Excel Columns function receives an Excel range and returns the number of columns that are contained within the range.
The syntax of the function is:
Where the array argument is the Excel range for which you want to return the number of columns.
The following spreadsheets show three simple examples of the Excel Columns function.
Note that the above functions were calculated in Excel 2010. Therefore, the formula in cell A3 returns the value 16,384, as this is the number of columns in Excel 2010. If this example were run in Excel 2003, it would return the number 256.
Further information on the Excel Columns function is provided on the Microsoft Office website.