Excel COUNTA Function

This Excel Tutorial demonstrates how to use the Excel COUNTA Function in Excel to count non-blank numbers, with formula examples.

COUNTA Function Description:

The COUNTA Function Counts the number of non-blank cells within a series

Formula Examples:

Syntax and Arguments:

The Syntax for the COUNTA Formula is:

Function Arguments ( Inputs ):

array – An array of numbers, text, or blank values.

Additional Notes

COUNTA Examples in VBA

You can also use the COUNTA function in VBA. Type:
For the function arguments (array, etc.), you can either enter them directly into the function, or define variables to use instead.


To count the non-blank cells in the following range

Vba COUNTA function

we would execute the following VBA code

The result would be :


We can count the non-blank cells for up to 30 ranges defined. If we need to count  non-blank cells for the following :

Vba counta excel


Executing the code below:

Would come up with:

as there are 86 non-blank cells in these two ranges


Return to the List of all Functions in Excel

How to use the COUNTA Function in Excel:

To use the AND Excel Worksheet Function, type the following into a cell:
After entering it in the cell, notice how the AND formula inputs appear below the cell:
counta formula syntax
You will need to enter these inputs into the function. The function inputs are covered in more detail in the next section. However, if you ever need more help with the function, after typing “=COUNTA(” into a cell, without leaving the cell, use the shortcut CTRL + A (A for Arguments) to open the “Insert Function Dialog Box” for detailed instructions:
how to use the counta function in excel

For more information about the COUNTA Formula visit the
Microsoft Website.