MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Adding up the number of cells containing an entry


Posted by PAUL GOODMAN on April 04, 2001 12:27 PM

I am adding up the cells in a spreadsheet, f15 to f39.
I have used the funciton =counta(f15:f39)to find the
number of cells in this range containing a numeric
value. However, if I put my cursor in the range and
hit the space bar, the counter increases by 1 and
continues as I hit the space bar in each cell in the
range. The outcome I am trying to achieve is a count
of the number of lines where there is an entry in the
range, i.e. the number of items listed.


Posted by Aladin Akyurek on April 04, 2001 12:49 PM

If you only interested in numeric values (including 0s), use

=COUNT(F15:F39)

COUNTA counts also spaces you enter by hitting space bar while in an additional cell.

Aladin

Posted by Michelle on April 04, 2001 12:55 PM


countif(range,"<> ") will count anything that is not equal to a space

count(range) will count numerical entries

counta(range) will count text