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: 37
Default Dynamically set the value for Field in auto filter

I am filtering two separate data files by values contained in the column
titled 'City'. The position of this column in the 1st file is column 10,
however it is in column 9 in the second file. The filter statement below
works for the 1st file but not the 2nd.

Selection.AutoFilter Field:=10, Criteria1:="=*" & Sheets("My
Sheet").Range("A2").Value _& "*"

I need a way to accomodate the two files with the same statement. I can
find this column in both files using the names previously inserted by another
routine. If I could determine the column number then I could set field = the
derived column number.

Any suggestions?
 
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
Dynamically load DataValidation List through Source field? Dave Excel Worksheet Functions 1 February 12th 10 08:35 PM
Auto Update of a field referencing to a field in another workbook Camper Joe Excel Worksheet Functions 1 February 14th 06 06:14 PM
Excel auto filter does not show all choices for the field? Jim Willy Excel Discussion (Misc queries) 1 December 15th 05 02:36 PM
Q: assign field background color dynamically according to field values Stephan Schnitzler Excel Programming 5 January 7th 05 07:35 AM
Dynamically changing a calculated field in Pivot Table Rick[_19_] Excel Programming 4 November 7th 03 04:46 AM


All times are GMT +1. The time now is 04:47 AM.

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"