Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • Excel Bar Chart
  • How to add Trendline to a chart in Excel
  • How To Sort One Column or Multiple Columns in Excel
  • Excel Frequency Function Example
  • Add Outline to Data in Excel

References

  • LOOKUP function: Description, Usage, Syntax, Examples and Explanation
  • Multi-criteria lookup and transpose in Excel
  • Two-way lookup with VLOOKUP in Excel
  • How to create dynamic named range with OFFSET in Excel
  • Last row number in range

Data Validations

  • Excel Data validation whole percentage only
  • How To Create Drop-down List in Excel
  • Excel Data validation allow weekday only
  • Excel Data validation exists in list
  • Excel Data validation with conditional list

How to count table columns in Excel

by

This tutorial shows how to count columns in an Excel table. To achieve this, you can use the COLUMNS function. See example below:

Formula

COLUMNS(table)

Explanation

In the example shown, the formula in I4 is:

=COLUMNS(Table1)

How this formula works

This formula uses structured referencing, a syntax that allows table parts to be referred to by name. When a table is referred to by the name only, Excel returns a reference to the data region of the table only. In this case, the entire table range is B4:F104 so Table1 returns the range B5:F105 to the COLUMNS function.

=COLUMNS(Table1)
=COLUMNS(B5:F105)

COLUMNS then returns a final result of 5, since there are 5 columns in the table.

Worked Example:   How to count total number of cells in a rectangular range in Excel

Post navigation

Previous Post:

How to generate random date between two dates in Excel

Next Post:

Popularly Used Excel Functions and their examples

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • Invoice status with nested if in Excel
  • OR function: Description, Usage, Syntax, Examples and Explanation
  • NOT function: Description, Usage, Syntax, Examples and Explanation
  • Check multiple cells are equal in Excel
  • SWITCH function example in Excel

Date Time

  • How to calculate project start date based on end date in Excel
  • ISOWEEKNUM function: Description, Usage, Syntax, Examples and Explanation
  • TIMEVALUE function: Description, Usage, Syntax, Examples and Explanation
  • Display Days until expiration date in Excel
  • Convert time to time zone in Excel

Grouping

  • Group arbitrary text values in Excel
  • Map inputs to arbitrary values in Excel
  • Group numbers at uneven intervals in Excel
  • Group times into 3 hour buckets in Excel
  • Categorize text with keywords in Excel

General

  • 231 Keyboard Shortcut Keys In Excel
  • Automatically fill series of cells in Excel using AutoFill
  • How to get amount with percentage in Excel
  • Spell Check in Excel
  • Index and match on multiple columns in Excel
© 2023 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning