Count rows visible in filtered table

drop05

Active Member
Joined
Mar 23, 2021
Messages
285
Office Version
  1. 365
Platform
  1. Windows
Hello, I have a table, table name "Reports" it is filtered in column J, and i am trying to get a count of just those rows that are visible but i am getting a high number like if it counting more than just what is visible,

Is there a specific vba method to get this count, i tried using the below but it is not getting the right output
wsAG is the worksheet, but maybe i should use the table name?
Thank you in advance!

Rowz = wsAG.AutoFilter.Range.Columns(1).SpecialCells(xlCellTypeVisible).Cells.Count - 1
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Hi drop05,

maybe try

VBA Code:
Rowz = wsAG.ListObjects("Reports").DataBodyRange.Columns(1).SpecialCells(xlCellTypeVisible).Count

Ciao,
Holger
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,971
Members
452,371
Latest member
Frana

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top