• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
The Electric Toolbox Blog

The Electric Toolbox Blog

Linux, Apache, Nginx, MySQL, Javascript and PHP articles

  • Applications
  • FCKEditor
  • Apache
  • Windows
  • Contact Us
Home / Article / Applications / Count rows and columns with Excel

Count rows and columns with Excel

Want to count rows and/or columns in a range with Excel no matter what content they contain? This post shows you how.

Count rows in Excel

Use this formula, where you want the number of rows selected from e.g. A1 to A10

=ROWS(A1:A10)

This example will show 10 in the cell where the formula is.

Count cells in Excel

Use this formula, where you want the number of columns selected from e.g. A1 to E1

=COLUMNS(A1:E1)

This example will show 5 in the cell where the formula is.

What happens when running the formulas against a block?

Note that the formulas will count the number of rows or columns, no matter what the selection. If we ran both rows() and columns() on the range A1 to E10, it would show 10 rows and 5 columns.

=ROWS(A1:E10)

ouputs 10

=COLUMNS(A1:E10)

outputs 5

Why?

Yes, selecting 5 cells from A to E is obviously 5 columns, but I personally manage a very basic ad booking system using a spreadsheet that is very very wide and I need to know numbers of days an ad is booked for. Using these functions makes it a lot easier, especially when it’s running across cells FB17 to GS17. No, it’s not the best ad booking system, but it works 🙂

And I’m sure you have your own reasons for needing to use these formulas, otherwise you wouldn’t have been looking for this post.

Check Out These Related posts:

  1. Using “group by” and “having” with MySQL
  2. Keyboard shortcuts for Excel for Mac
  3. MySQL Control Center Returns 1000 Rows
  4. Count the words in a textarea or input with jQuery

Filed Under: Applications

Primary Sidebar

Categories

  • Apache
  • Applications
  • Article
  • Case Studies
  • Email Servers
  • FCKEditor
  • HTML And CSS
  • Javascript
  • Linux/Unix/BSD
  • Microsoft SQL Server
  • Miscellaneous Postings
  • MySql
  • Networking
  • Nginx Web Server
  • Offsite Articles
  • OSX
  • PHP
  • Quick Tips
  • RFC – Request for Comments
  • SilverStripe
  • VMWare
  • VPN
  • Windows
  • WordPress

Recent Posts

  • Vim Show Line Numbers
  • Add User To Group Linux
  • Chmod 777 Tutorial
  • How to Copy Directory Linux
  • Linux create user

Copyright © 2021. ElectricToolBox. All Rights Reserved.

  • Contact Us
  • Copyright Info
  • Privacy Policy
  • Sitemap