Excellency

View Original

The COUNTA function

The COUNTA function is a statistical function which counts the number of non-blank cells in the selected range. This includes cells with blanks coded into them.

This is the format of the COUNTA function:

=COUNTA(Range 1, Range 2, Range 3, etc…)

Here is an example of the COUNTA function:

=COUNTA(1, “a”, 5, 4, 7, “hello”, “”) = 7

COUNTA returning a count of all non-blank cells in the range

It is a very useful function when needing to tally a set of values regardless of the actual responses within them. It will still not tally to the total number of cells within the range if there are any which are completely blank, but those cells would constitute a non-valid response and would not want to be counted.

An example of a functional implementation of this would be if you are building a formula for a template which compiles reviews for a software or service. One which requires knowing which cells in a range contains valid information. This valid information could be another formula, a manually inserted value, or a purposeful blank value. You do this so that once you have received a minimum number of valid reviews, they can be shared with the client or become eligible for analysis. If in column H you have customer reviews, and require a minimum of 50 valid reviews before undertaking an analysis, you could formulate the header of row H with a COUNTA formula.

=IF(COUNTA($H$2:$H$200)>50, “Eligible”, “Ineligible”)

*Note that the IF function was used in this example, being one of the most commonly used functions it is strongly suggested that you have a good grasp of its functionality!*

See this content in the original post