Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Save file as todays date | Excel Discussion (Misc queries) | |||
Recovering File Info Specifically Save Date or Print Date | Excel Discussion (Misc queries) | |||
in 2007, how come the sort does not default after I save a file? | Excel Worksheet Functions | |||
Macro to Sort automatically when file/save is selected | Excel Discussion (Misc queries) | |||
How do I save my 'sort criteria' in an Excel file? | Excel Worksheet Functions |