Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a table that looks like this:

Column A


And some more words. But on the side of the table, I want to have a cell which tells me how many rows I have in Column A, and I want it to update as I add more rows. How could I do this using equations or functions?

share|improve this question

migrated from Sep 9 '11 at 15:01

This question came from our site for professional and enthusiast programmers.

up vote 5 down vote accepted

=COUNTA(A:A)-1 will return the number of non-blank cells in Column A.

share|improve this answer
Ah, good one with the minus 1. – Lance Roberts Sep 8 '11 at 23:18

If you don't mind the header cell being counted you could just use:

share|improve this answer

If your rows contain text you will need {=COUNT(IF(A:A<>"",1,0))}

It needs to be entered as an array formula. You might also need to subtract some value from this to account for header rows.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.