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 How to detect changin filename & to hv more than 2 autofilter crit

My company will put up a new file daily on the shared folder and the filename
changes according to the date e.g. Shortage_080309.xls. I have to download it
everyday and work on it.

In this file, there are 3 worksheets. First worksheet has all the raw data,
it's the worksheet I need to work on. It's named "Shortage 080309", and the
name of the worksheet also changes according to current date. I don't use
the other 2 worksheets. They are named "Def" and "Sheet3" respectively.

What I am trying to do is to create a macro that can help me to,
1. insert a new worksheet in the same workbook
2. rename the new worksheet to "My Shortage <mmddyy" eg. "My Shortage
080309",
3. copy all data from first/main worksheet "Shortage <mmddyy" eg. "Shortage
080309" and paste it on the newly created worksheet.
4. on the new worksheet, filter the data on column D
5. sort by column D and that's it.

The data on column D (header is named "PRD") is 4 digit Prod number e.g.
0417,0604. Not all Prod numbers will appear in the file everyday. I have a
list of specific numbers (about 10 Prod number out of 1000+) that I want to
filter.

I can create the macro fairly easy in Excel 2007 to select the Prod number I
want, but the custom filter in Excel 2003 only allow me select 2 filter
requirements. I need 10.

Another thing is, the macro will be saved in the Excel file itself. How do
I make it "global", so that I am able to use it on another file?

All tips/advice/guidance are appreciated.

regards,
choo
 
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
How can I detect change to Autofilter selection MikeZz Excel Programming 1 July 23rd 09 06:23 AM
Detect Autofilter Change Event Alan Z. Scharf Excel Programming 2 March 13th 09 10:01 PM
is there a formula to add numbers in a range based on several crit BROCK8292 Excel Discussion (Misc queries) 2 March 25th 08 01:00 AM
Advancedfilter returning all rows instead of ones that match crit jjfjr Excel Programming 8 July 13th 05 08:37 PM
How can I detect an AutoFilter when the Criteria isnt Met Frederick Excel Programming 2 August 12th 03 02:43 PM


All times are GMT +1. The time now is 01:13 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"