Count Visible Rows with formula

adamsm

Active Member
Joined
Apr 20, 2010
Messages
444
Hi anyone,

The following formula counts the visible rows.

=SUBTOTAL(2,A6:A3006)

How could I make the formula to count the records as;

Lets say for example 3 records out of 300 records found.

Any help on this would be kindly appreciated.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Maybe

=SUBTOTAL(102,A6:A3006)&" out of "&COUNT(A6:A3006)&" Records Found"
 
Upvote 0
Thanks for the help. If the formula is to be used in another sheet except the active sheet; How should I change the formula with the sheet's name?

The name of the sheet that is to be included in the formula is (MySheet).
 
Upvote 0
Just add the sheetname to the ranges

=SUBTOTAL(2,'Sheet Name'!A6:A3006) & " out of " & COUNT('Sheet Name'!A6:A3006) & " records found"
 
Upvote 0
Thanks for the help and I do really appreciate it. By the way if the sheet is not filtered the formula shows 0 records out of 0 records. Is there a way to make this not visible. and only visible when the sheet gets filtered?
 
Upvote 0

Forum statistics

Threads
1,224,534
Messages
6,179,391
Members
452,909
Latest member
VickiS

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