Access only not hidden rows

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
 
T

Tom Ogilvy

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
 
V

Volker Jobst

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
 
G

Gord Dibben

Volker

Check out the SUBTOTAL Function for counting filtered rows.

Gord Dibben Excel MVP XL2002
 
Top