How to use Excel COLUMNS function

Introduction

COLUMNS function in excel is a lookup or reference function. It provides us with number of COLUMNS in an array or reference. We have to enter a range in Excel format and it returns number of COLUMNS present in that range. For example row A1:C6 gives 3 as the result.   

 Syntax

=COLUMNS(Array)

Arguments

array– It can be the range of cells or an array formula, or an array.

Keynotes

  • A name range may also be used in COLUMNS function
  • It does not return values present inside the cells, it simply returns number of cells.
  • If we remove the argument than COLUMNS function automatically considers that cell as the argument in which it has been entered. For example If function =COLUMNS() is entered in cell A1 it would consider A1 as the argument and give one as the result.
  • It can also be used with other functions like to count total number of cells COLUMNS function can be combined with ROWS function.
  • It can also be combined with ADDRESS function to get the complete address of a range.

Examples

1.Total number of columns in a range: – In this example we calculated total number of COLUMNS by using the syntax =COLUMNS(A4:C9) which gave 3 as the result.

COLUMN FUNCTION

2. Total Cells: – COLUMNS function can be used with ROWS function to get total number of cells in a range. In the following example we use the syntax =ROWS(A4:C9)*COLUMNS(A4:C9),which gives 18 as the result.

Leave a Reply

Close Menu
×

Cart