filter

G

geebee

hi,

i have the following:

Sheets("sheet1").Select
Cells.Select
Selection.AutoFilter
Selection.AutoFilter Field:=2, Criteria1:="test"

i would like to know if there is a way i can filter the sheet without
selecting it?

thanks in advance,
geebee
 
S

Sheeloo

You do not need to select the sheet but you do have to pass a range object to
autofilter..

If your headers are in row 1 in sheet 1 then you can use

Sheets("sheet1").Range("A1").autoFilter Field:=2, Criteria1:="test"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top