Columns Function in Excel is an inbuilt function which is quite similar to the rows function in excel, it gives the number of columns of the range of data provided to it, it is different from the column function which gave the column number, this function provides us the number of columns instead.

**COLUMNS Function in Excel (Table of Contents)**

## COLUMNS in Excel

COLUMNS function is a built-in function in Microsoft Excel. It falls under the category of Lookup Functions in Excel. COLUMNS Function in Excel returns the total number of columns in the given array or collection of references. The purpose of COLUMNS function in Excel is to know the number of columns in an array or references.

### COLUMNS Formula in Excel

The COLUMNS Formula in Excel is as follows:

**Recommended Courses**

### Explanation of COLUMNS Function in Excel

COLUMNS Function in Excel has only one argument. Where,

**array***=*This is a required parameter. An array / a formula resulting into an array / a reference to a range of excel cells for which the number of columns is to be calculated.

COLUMNS in Excel returns a positive numeric value.

**How to use COLUMNS Function in Excel?**

Let’s understands the examples of Column function given below.

The said function is a Worksheet (WS) function. As a WS function, Columns in excel can be entered as a part of the formula in a cell of a worksheet. Refer to the examples given below to understand better.

Let’s look at the columns examples given below. Each example covers a different use case implemented using COLUMNS function in Excel.

### COLUMNS Example 1 – Total columns in a range

In this columns example, cell G3 has a formula associated with it. So, G3 is a result cell. The argument for COLUMNS Function in excel is a cell range which is B4: D4. Here, B4 is a starting cell and D4 is the ending cell. The number of columns in between these two cells are 3. So, the result is 3.

### COLUMNS Example 2 – Total cells in a range

In this example, cell G4 has a formula associated with it. So, G4 is a result cell. The formula is COLUMNS (B4: E8) * ROWS*B4: E8). Multiplication is performed between the total number of columns and a total number of rows for the given range of cells in the sheet. Here, the total number of columns is 4 and the total number of rows is 5. So, the total number of cells is 4*5 = 20.

4.9 (1,353 ratings)

### COLUMNS Example 3 – Get the address of the first cell in a range

Here, the dataset is named as ‘data’. Further, this ‘data’ is used in the formula. Refer to the steps given below to name the dataset.

Step#1. Select the cells.

Step#2. Right and click and choose ‘Define Name’

Step#3. Name the dataset as ‘data’.

In this columns example, cell G6 has a formula associated with it. So, G6 is a result cell. The formula is to calculate the first cell in the dataset represented by name ‘data’. The result is $B$4 i.e. B4 which is the last cell in the selected dataset.

The formula uses ADDRESSES function which has two parameters namely row number and column number.

E.g.: ADDRESS (8,5) returns $B$4. Here, 4 is the row number and 2 is the column number. So, the function returns cell denotes by these row and column numbers.

Here,

A row number is calculated by

*ROW(data)*

And the column number is calculated by

*COLUMN(data)*

### COLUMNS Example 4 – Get the address of the last cell in a range

Here, the dataset is named as ‘data’. Further, this ‘data’ is used in the column’s formula in excel. Refer to the steps given below to name the dataset.

Step#1. Select the cells.

Step#2. Right and click and choose ‘Define Name’

Step#3. Name the dataset as ‘data’.

In this COLUMNS example, cell G5 has a formula associated with it. So, G5 is a result cell. The formula is to calculate the last cell in the dataset represented by name ‘data’. The result is $E$8 i.e. E8 which is the last cell in the selected dataset.

The formula uses ADDRESSES function which has two parameters namely row number and column number.

E.g.: ADDRESS (8,5) returns $E$8. Here, 8 is the row number and 5 is the column number. So, the function returns cell denotes by these row and column numbers.

Here,

A row number is calculated by

*ROW(data)+ROWS(data-1) *

And the column number is calculated by

*COLUMN(data)+COLUMNS(data-1)*

**Things to remember about the COLUMNS Function in Excel**

- The argument of the COLUMNS function in excel can be a single cell address or a range of cells.
- The argument of the COLUMNS function in excel cannot point to multiple references or cell addresses.

### Columns Function in Excel Video

### Recommended Articles

This has been a guide to Columns Function in Excel. Here we discuss the Columns Formula in Excel and how to use Columns in Excel along with practical examples and downloadable excel templates. You can also go through our other suggested articles –

- Excel Column Lock
- Excel Freeze Columns
- How to use Column Grouping in Excel?
- Methods of Rows to Columns in Excel
- Methods to Compare Two Columns in Excel
- MODE Function on Excel
- Address in Excel
- Column in Excel
- Choose in Excel
- GetPivotData Function in Excel

- 35+ Courses
- 120+ Hours
- Full Lifetime Access
- Certificate of Completion