Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro to "archive" cells


I have data in columns A through H, with dates in column G. I want to
move all the data from A through H, for a given row, if the date in G
(on that row) is before today. I know how to make it check the date
against todays date, and I know how to paste the cells on the new page,
but I don't know how to reference the cells that I want moved in that
given row, so I can actually move them. I hope that makes sense.
Can anybody lend any advice?
Thanks you!


--
m3s3lf
------------------------------------------------------------------------
m3s3lf's Profile: http://www.excelforum.com/member.php...o&userid=34874
View this thread: http://www.excelforum.com/showthread...hreadid=557713

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Macro to "archive" cells

Sub test()

Dim i As Long
Dim n As Long

For i = 1 To 10
If Cells(i, 7) < Date Then
n = n + 1
Range(Cells(i, 1), Cells(i, 8)).Copy Sheets(2).Cells(n, 1)
End If
Next

End Sub


RBS

"m3s3lf" wrote in
message ...

I have data in columns A through H, with dates in column G. I want to
move all the data from A through H, for a given row, if the date in G
(on that row) is before today. I know how to make it check the date
against todays date, and I know how to paste the cells on the new page,
but I don't know how to reference the cells that I want moved in that
given row, so I can actually move them. I hope that makes sense.
Can anybody lend any advice?
Thanks you!


--
m3s3lf
------------------------------------------------------------------------
m3s3lf's Profile:
http://www.excelforum.com/member.php...o&userid=34874
View this thread: http://www.excelforum.com/showthread...hreadid=557713


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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Adding Hyperlinks to "Archive" [email protected] Excel Discussion (Misc queries) 0 May 26th 07 03:26 PM
Macro to concatenate into "B1" B2 thru B"x" based on new data in "Col A" Dennis Excel Discussion (Misc queries) 0 July 17th 06 02:38 PM
Using "Cells" to write "Range("A:A,H:H").Select" Trip Ives[_2_] Excel Programming 3 June 5th 04 03:13 PM
Any way to "Save As" without setting the archive bit on original file inaz[_2_] Excel Programming 2 January 14th 04 01:57 PM


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