excel functions

MS Excel: COLUMNS Function (WS)

This Excel tutorial explains how to use the Excel COLUMNS function with syntax and examples.


The Microsoft Excel COLUMNS function returns the number of columns in a cell reference.


The syntax for the COLUMNS function in Microsoft Excel is:

COLUMNS( reference )

Parameters or Arguments

A reference to a range of cells or an array.

Applies To

The COLUMNS function can be used in the following versions of Microsoft Excel:

  • Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000

Type of Excel Function

The COLUMNS function can be used in Microsoft Excel as the following type of function:

  • Worksheet function (WS)

Example (as Worksheet Function)

Let's look at some Excel COLUMNS function examples and explore how to use the COLUMNS function as a worksheet function in Microsoft Excel:

Result: 1

Result: 2

Result: 2

Result: 4

You can also defined a named range called suppliers that refers to Sheet1!$A$1:$C$8.

Microsoft Excel

Then using the COLUMNS function, you could refer to this named range as follows:

Result: 3