## Excel COLUMNS function

Description

Syntax and Arguments

Usage and Examples

### Description

The COLUMNS function returns the total number of columns in a given array or reference. For example, COLUMNS(A1:D4) returns 4.

### Syntax and arguments

Formula syntax

 =COLUMNS(array)

Arguments

 Array: Required. It’s an array or an array formula or a reference of a range of cells which you want to count the total number of columns.

Return Value

The COLUMNS function returns the number of columns in an array or reference.

### Usage and Examples

With the COLUMNS function you not only can count the numbers of a range, but also solve other jobs.

Example1: Count total number of columns in a range

Formula1

=COLUMNS(A1:D1)

Explain: Count the total number of columns in the range of A1:D1

Result:4

Formula2

=COLUMNS(DATA)

Explain: Count the total number of columns in the defined name range of “DATA” (range A1:D10)

Result: 4

Example2: Count total number of cells in a range

With combining the ROWS function and the COLUMNS function, you can obtain the total number of cells in a given range.

Formula

=ROWS(DATA)*COLUMNS(DATA)

Explain:

Data: the defined name which you want to count the total number of cells.

ROWS: return the total number of rows from the given reference

Result: 40

Example3: Obtain the last cell address of a given range

Formula

Explain:

ADDRESS(row_num,column_num): returns the cell address based on the given row number and column number.

ROWS(): returns the total number of rows.

COLUMNS(): returns the total number of columns.

Then the formula shown as this:

Result: \$D\$10

Sample File

### The Best Office Productivity Tools

#### Kutools for Excel - Helps You To Stand Out From Crowd

 🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions… Popular Features: Find, Highlight or Identify Duplicates  |  Delete Blank Rows  |  Combine Columns or Cells without Losing Data  |  Round without Formula ... Super VLookup: Multiple Criteria  |  Multiple Value  |  Across Multi-Sheets  |  Fuzzy Lookup... Adv. Drop-down List: Easy Drop Down List  |  Dependent Drop Down List  |  Multi-select Drop Down List... Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Columns to Select Same & Different Cells ... Featured Features: Grid Focus  |  Design View  |  Big Formula Bar  |  Workbook & Sheet Manager | Resource Library (Auto Text)  |  Date Picker  |  Combine Worksheets  |  Encrypt/Decrypt Cells  |  Send Emails by List  |  Super Filter  |  Special Filter (filter bold/italic/strikethrough...) ... Top 15 Toolsets:  12 Text Tools (Add Text, Remove Characters ...)  |  50+ Chart Types (Gantt Chart ...)  |  40+ Practical Formulas (Calculate age based on birthday ...)  |  19 Insertion Tools (Insert QR Code, Insert Picture from Path ...)  |  12 Conversion Tools (Numbers to Words, Currency Conversion ...)  |  7 Merge & Split Tools (Advanced Combine Rows, Split Excel Cells ...)  |  ... and more

Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...

#### Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

• One second to switch between dozens of open documents!
• Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
• Increases your productivity by 50% when viewing and editing multiple documents.
• Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.