COUNTA() function in OpenOffice

Just discovered the COUNTA() function in OpenOffice (probably also in other spreadsheets like M$ Excel).

This enables you to count the number of cells that contain any text, unlike COUNT(), which only counts cells that have content in numbers (e.g. “2,4,6, eight” would return “3″). The same sequence using COUNTA() returns “4″.

I found this to be useful when recording marks for students. I can put their grades in the appropriate cells, then use COUNTA(cell range) to record how many I’ve completed (and can therefore bill for!). Excellent!

Example:

A B
1 Alice
2 Bob B B B    B1
3 Chris C A A  A3
4 Dan C C C  C2
5 Eilidh B C B   B3
6 Fionnuala
7 TOTAL [=COUNTA(B1:6)]
returns “4″
Advertisement

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s