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 an Excel spreadsheet and I'm trying to count rows in a column based on a style applied to some cells in the column. Is there a simple way to do this?

share|improve this question
up vote 2 down vote accepted

No, not really. You could use Visual Basic to access cell formatting properties but most inbuilt functions that you would type into a cell focus on the cell contents, not the formatting.

If your styles have different shading colours then you can use the following method.

Step 1: Convert your range to a list and then adding a total row showing COUNT

enter image description here

Step 2: Apply a colour filter (should work on Excel 2007 and later):

enter image description here

Done: The COUNT total will show the filtered number of rows.

enter image description here

share|improve this answer
I would have preferred an answer that said, "of course you can! here's how to do it!" but, alas, you're probably right. There's no way to do what I want without using VB. Thanks. – Bill Weinman May 3 '12 at 18:24

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.