Dim rng as Range
set rng = ActiveSheet.Autofilter.Range.Columns(1).specialCel ls(xlVisible)
msgbox rng.Count - 1 & " data rows are visible"
--
Regards,
Tom Ogilvy
"walshy06" wrote:
Hi,
I need to be able to count the number of cells that I highlight with
the cursor in a column.
For Example: I have a spreadsheet with 1000 records.
I will need to run autofilter to retrict my rows.
Then I need to be able to count the number of rows that are *remaining
*after the autofilter has been applied.
If I could highlight the remaining rows with the curser and then run a
macro to count the number of rows that I have highlighted?? Any
thoughts?
This is urgent so any help would be great!
Thanks!
--
walshy06
------------------------------------------------------------------------
walshy06's Profile: http://www.excelforum.com/member.php...o&userid=34132
View this thread: http://www.excelforum.com/showthread...hreadid=539012