Not able to Count rows after filter is applied.


I have an Excel spreadsheet that contains user information.  

One of the columns is called LASTLOGONTIME.  I apply a filter to filter that column only to only specific year and month.

After that, I highlight rows and trying to get the count of how many rows of users.  

The number in the Count field is not correct.  

Please see the attached and advise.  

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rob HensonFinance AnalystCommented:
You can use the SUBTOTAL function to show a count of the filtered rows:


Enter the formula in a cell below the filter range and it will still be visible.

Your count in the status bar might actually be correct looking at your screenshot. You have selected the range and there are 5 rows visible but you have selected at least 7 columns with values, 7 x 5 = 35
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
The Count figure is the count of the cells in the selected range not the count of the rows visible.
If you want to count the rows, you need to select cells in one of the column only.

When you filter the data set, if you notice on the left side of the status bar (just opposite to where the count figure appears i.e. next to the macro recorder button on the status bar), you will notice that Excel displays the filters rows details. That count will give you the exact count of the filtered rows.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Here is what I am referring to...

Rob HensonFinance AnalystCommented:
To confirm that the figures on the right hand end of the status bar are correct for your selection.

Range selected is 5 rows and more than 7 columns. Only the first 7 columns contain values/text so Count shows 35.
Of those cells that contain numbers there are 20 (the 4 time columns).
The SUM of those is shown as 861955.0402 which when divided by 20 gives 43097.75201 which shows as your average value.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.