Access only not hidden rows

  • Thread starter Thread starter Volker Jobst
  • Start date Start date
V

Volker Jobst

Hi,

How can I go through my sheet by using offset(1,0) and selecting only
rows which are not hidden by the autofilter?

thanx volker jobst
 
Why would you want to?

dim rng as Range, rng1 as Range
set rng = Activesheet.Autofilter.Range
set rng = rng.offset(1,0).Resize(rng.rows.count-1)
On Error Resume Next
set rng1 = rng.SpecialCells(xlvisible)
rng1.Select
' or
'rng1.EntireRow.Select
 
I'm trying to do so because I want to count the values after the
autofilter has been set. I'll try your solution, thanx
 
Volker

Check out the SUBTOTAL Function for counting filtered rows.

Gord Dibben Excel MVP XL2002
 
Back
Top