Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default Moving Files into an archive

I have a project list in excel that I track and would like to know if there
is a way when an item is completed I can set it up that it automatically goes
to an archive worksheet the following week.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 638
Default Moving Files into an archive

Yes, that would be possible using VBA. You would need to have a
completion date in your data though. Then you could usse the
Workbook_Open event (or Auto_Open) to cycle through the main sheet and
anything that has a completion date les than todas date minus 7 days.
Something like:

One Way:
Private Sub Workbook_Open()
Dim r As Long
With Sheets("Main")
For r = 2 To .Cells(65536, 1).End(xlUp).Row
With .Cells(r, 1)
If .Value < Date - 7 Then
.EntireRow.Cut Destination:= _
Sheets("Archive").Cells(65536, 1) _
.End(xlUp).Offset(1, 0)
End If
End With
Next r
End With
End Sub

This code would need to be placed in the ThisWorkbook code module.
The above code doesn't handle the deletion of the cut row. That could
always be incorporated though. Also, this is assuming that the
completion date is in column A.

Sher wrote:
I have a project list in excel that I track and would like to know if there
is a way when an item is completed I can set it up that it automatically goes
to an archive worksheet the following week.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default Moving Files into an archive

Thanks JW will give it a try.

"JW" wrote:

Yes, that would be possible using VBA. You would need to have a
completion date in your data though. Then you could usse the
Workbook_Open event (or Auto_Open) to cycle through the main sheet and
anything that has a completion date les than todas date minus 7 days.
Something like:

One Way:
Private Sub Workbook_Open()
Dim r As Long
With Sheets("Main")
For r = 2 To .Cells(65536, 1).End(xlUp).Row
With .Cells(r, 1)
If .Value < Date - 7 Then
.EntireRow.Cut Destination:= _
Sheets("Archive").Cells(65536, 1) _
.End(xlUp).Offset(1, 0)
End If
End With
Next r
End With
End Sub

This code would need to be placed in the ThisWorkbook code module.
The above code doesn't handle the deletion of the cut row. That could
always be incorporated though. Also, this is assuming that the
completion date is in column A.

Sher wrote:
I have a project list in excel that I track and would like to know if there
is a way when an item is completed I can set it up that it automatically goes
to an archive worksheet the following week.



Reply
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
Archive Data with Excel files hmm Excel Discussion (Misc queries) 4 June 25th 07 10:39 PM
Moving files which are linked chrismc1972 Excel Discussion (Misc queries) 1 January 23rd 07 09:28 PM
Moving xls files that have links?? Bill Links and Linking in Excel 2 November 2nd 06 06:57 AM
Maintaining links when renamining/moving files Lou Di Pietro Excel Discussion (Misc queries) 2 July 20th 05 03:55 AM
Moving Files in Excel D Huber Excel Discussion (Misc queries) 1 June 24th 05 08:00 PM


All times are GMT +1. The time now is 02:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"