Excel COUNT() Function

In this article I will explain the count function. The COUNT() function returns the number of cells in a range which have numeric values in them. You can download the workbook for this article here.

Jump To:

Contents

Syntax:

=COUNT(Range1, Range2, ....)

Where Range1, Range2, … are the ranges which the count function searches for numeric values in them


Example 1, Get Row Count:

In this example I will use the COUNT() function to get the number of rows with numeric values in them:

Excel, COUNT, Number of Rows with data

Result:

Excel, COUNT,Number of Rows with data result

If we choose to add extra rows to column A, the value in cell B2 would update automatically:

Excel, COUNT,Number of Rows with data result 2


Example 2, Get Column Count:

In this example I will use the COUNT() function to get the number of columns with numeric values in them:

Excel, COUNT, Number of Columns with Data

Result:

Excel, COUNT, Number of Columns with Data Result

By adding columns to row 1, cell B2 would update automatically.

Related article: Click here for a guide on COUNTIF().

And here’s more information on counting rows and empty rows using VBA.

You can download the workbook for this article here.

If you need assistance with your code, or you are looking to hire a VBA programmer feel free to contact me. Also please visit my website  www.software-solutions-online.com

Leave a Reply

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