# Using Excel's COUNTA Function

If you're familiar with Excel's

To solve the problem, Excel has a similar, equally-useful function: *all* cells, not just those with numerical values.

## The basic COUNTA function

Like

=COUNTA (value_or_range ,value_or_range_2 (optional) ...)

When fed one or more ranges of cells or values,

Here's an example of

=COUNTA (5 ,"Boston" )

Output:2

The above formula outputs the number

Note that

=COUNTA (5 ,"Seven" ,10 ,#N/A ,"" )

Output:5

This formula spits out the number

## COUNTA with a range

Of course, counting the number of static inputs to a

In the following example, a SnackWorld analyst has a list of customer names paired with e-mail addresses. Some of the customers have left their e-mail addresses, but some haven't — so not every name is matched to an address. The analyst wants to know how many e-mail addresses and customers are on the list, respectively. So, she writes the following formula:

=COUNTA (C3:C8 )

Output:2

This formula evaluates to

The same formula works to count the number of customers on the range

=COUNTA (B3:B8 )

Output:6

## When to use Excel's COUNTA function

Now that you know how to use

- Count the number of customers on a customer list;
- Count the number of transactions made in a given time period;
- Find how many tests have been submitted and scored by students; or
- Calculate the number of days of data available in a data set.

Questions or comments? Let us know below!

## Save an hour of work a day with these 5 advanced Excel tricks

Work smarter, not harder. Sign up for our 5-day mini-course to receive **must-learn lessons** on getting Excel to do your work for you.

- How to create
**beautiful table formatting**instantly... - Why to
**rethink the way you do VLOOKUPs**... - Plus, we'll reveal
**why you shouldn't use PivotTables**and what to use instead...