#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 190
Default filter

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,805
Default filter

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"


"geebee" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataFilterAuto Filter in excel 2007? TIJ New Users to Excel 2 November 13th 08 03:28 AM
Filter PivotTable dropdown items to match report filter Catherine D Excel Discussion (Misc queries) 1 August 16th 08 12:12 AM
filter: how to print filter list options in dropdown box help please Excel Discussion (Misc queries) 2 October 17th 07 01:53 AM
Advance filter search does not filter an exact match cfiiland Excel Programming 1 June 10th 05 12:44 PM
"Criteria Range" in the "Data/Filter/Advanced Filter" to select Du TC Excel Worksheet Functions 1 May 12th 05 02:06 AM


All times are GMT +1. The time now is 11:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"