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: 26
Default Sort and Save File by Date

Ok, this one has me completely lost. I know some basics and have learned alot here and from google, but I can't find anything that really works as a solution to my problem

Here is what I have. I have a file that contains about 30,000 rows and 12 columns. One of the columns is a date for each entry. What I need to do is seperate this data by the date and then store it as seperate files. I only need to sort by the month and year. The file should never have more than three consecutive months worth of data, mainly the middle month, but a little on either end month. What I need to do is pull out all the data for a specific month and year, copy it and store it in a file that is named for that month and year. EX: I would pull out all data for month 01 and year 04 and save it in a file called "January04.xls".

The problem is this main file changes about once a month or so, so I can't hard code in any of the sorts, otherwise I would know how to do this myself. But I won't know what dates are there so I have to sort by dates in the file and then save it to a file for that date name.

Also if the file doesn't exist already for that month and year then it needs to create it, if the file already exists (all files will be in one folder) then it needs to add this data to that file starting in the last available row.

My only lead is to base it off of this type of sort which I know how to manipulate - but I don't even know if I am on the right track for something like this problem.

With sh
.Columns("A:C").AutoFilter Field:=2, Criteria1:="January"
.Columns("A:C").AutoFilter Field:=3, Criteria1:="04"
.Columns("A:A").SpecialCells(xlCellTypeVisible).Co py _
Sheets("ImportFilesList").Range("D1")
.Columns("D:D").AutoFilter
End With

Any help would be greatly appreciated as I am completely lost. Sorry if the explanation is a little confusing.

Thanks,

Jim
 
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
Save file as todays date Rinto Syah Excel Discussion (Misc queries) 4 May 4th 09 11:39 AM
Recovering File Info Specifically Save Date or Print Date Gadgetgw Excel Discussion (Misc queries) 4 October 6th 08 08:43 PM
in 2007, how come the sort does not default after I save a file? Trina Excel Worksheet Functions 1 December 29th 07 07:27 PM
Macro to Sort automatically when file/save is selected KDG Excel Discussion (Misc queries) 3 December 20th 05 08:28 PM
How do I save my 'sort criteria' in an Excel file? Jobod Excel Worksheet Functions 2 November 20th 05 04:06 AM


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