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 By Date and Save

This is a follow up to a previous post - but I have got a much better start

Here is what I have put together so far

Sub FindOrCreate(
Application.DisplayAlerts = Fals
Dim MyPath As Strin
Dim sh As Workshee
Workbooks.Open (ThisWorkbook.Path & "\ReportOne.xls"
Set sh = ActiveWorkbook.ActiveShee
With s
.Columns("A:I").AutoFilter Field:=8, Criteria1:="January
.Columns("A:I").AutoFilter Field:=9, Criteria1:="2004
.Columns("A:I").SpecialCells(xlCellTypeVisible).Co p
If Dir(ThisWorkbook.Path & "\ProgramData\FileData\StoredData\January2004.xls" ) < "" The
'Ope
Workbooks.Open (ThisWorkbook.Path & "\ProgramData\FileData\StoredData\January2004. xls"
Els
'Creat
Workbooks.Ad
Sheets("Sheet2").Selec
ActiveWindow.SelectedSheets.Delet
Sheets("Sheet3").Selec
ActiveWindow.SelectedSheets.Delet
End I
Sheets("Sheet1").Range("A1").PasteSpecia
.Columns("D:D").AutoFilte
End Wit
Application.DisplayAlerts = Tru
End Su

I have a couple of issues to fix though. I need to make sure that it appends the data that is being copied at the end of whatever current data exists. Also as before all of this contains hard coded values and I have to change that, but I am completely clueless as to how to do that. It has to do the sort for date (month and year) copy that and then open or creat the file based on that date - paste the data - then continue through the origional file and take out any other month and year that is available. (as before no origional data file will contain more than three combinations of month and year).So basically all of the code above where it says "January2004", that value would have to come from the data sorted and the value in fields 8 & 9

Any help on this would be greatly appreciated, as this is really my only hold up, after this I just have to generate reports off of this data, and all of that I know how to do

Thanks in advance for any help or advice

James Stephens
 
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
Is there a way to Auto sort or save a sort? Barbie Excel Discussion (Misc queries) 11 December 1st 09 09:48 PM
save sort order ? rolando Excel Discussion (Misc queries) 1 March 10th 09 01:19 PM
how do i save the sort settings lark4dr Setting up and Configuration of Excel 0 June 8th 07 10:47 PM
Auto sort & save Pebbbles Excel Worksheet Functions 0 February 14th 06 03:26 AM
Sort and Save File by Date James Stephens Excel Programming 0 January 13th 04 03:41 AM


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