View Single Post
  #3   Report Post  
Spencer101 Spencer101 is offline
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by LAS View Post
I want to have the number of students in a class to automatically update
when I add or remove a row. In other words, I want the value for "count" to
always be correct. I see how I could do this by making an =row() column,
but that wouldn't be idiot proof. Any new row would have to have that value
added by the user. Is there any way to count rows that have no numeric
value in them?

Example

First Name Last Name
Alma Diderot
Mark Woolser
Amy Fleisher
Count 3
Hi,

I'm not sure I'm understanding what you mean. When you say "is there any way to count rows that have no numeric value in them?", do you mean you're trying to count text cells only or a combination of any cells in a given range that do not contain numbers, whether or not they are blank or contain text?

As far as I can see, in your example data above (presuming it covers cells A1 to B5) if you enter =COUNTA(A1:A5)-2 into cell B5 that should give you the result you're looking for and will allow you to enter rows and delete rows.

All it does is count the number of populated cells between A1 and A5 and subtracts 2 from that total to account for the header value in A1 and the footer value in A5.