LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default vba autofilter two columns

I would like to be able to filter a sheet based off of two columns in
VBA. If I run the following one at a time I can filter based off the
one column, but if I run them both it will not work.

Worksheets("Master Index").Range(Cells(12, 42), Cells(65536,
42)).AutoFilter field:=1, Criteria1:="E", Operator:=2, Criteria2:="M/
E"

Worksheets("Master Index").Range(Cells(12, 163), Cells(65536,
163)).AutoFilter field:=1, Criteria1:="1", Operator:=2, Criteria2:="1"

Also, what is the field option used for?

Thank you for your help,
David

 
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
autofilter on many columns inquirer Excel Discussion (Misc queries) 3 July 16th 06 04:32 AM
Which columns AutoFilter is on. [email protected] Excel Programming 1 June 21st 06 03:26 AM
Which columns AutoFilter is on. [email protected] Excel Programming 0 June 20th 06 11:50 PM
Which columns AutoFilter is on. [email protected] Excel Programming 0 June 20th 06 11:50 PM
VBA to set which columns in Autofilter miker1999[_10_] Excel Programming 2 February 15th 04 02:44 AM


All times are GMT +1. The time now is 10:03 PM.

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

About Us

"It's about Microsoft Excel"