Not able to Count rows after filter is applied.

Hello,

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.  

Thanks.
user-info.png
nav2567Asked:
Who is Participating?
 
Subodh Tiwari (Neeraj)Connect With a Mentor 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.
0
 
Rob HensonConnect With a Mentor Finance AnalystCommented:
You can use the SUBTOTAL function to show a count of the filtered rows:

=SUBTOTAL(3,A1:A90)

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
0
 
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Here is what I am referring to...

Filtered-Rows.jpg
0
 
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.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.