Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
Adding Hyperlinks to "Archive" | Excel Discussion (Misc queries) | |||
Macro to concatenate into "B1" B2 thru B"x" based on new data in "Col A" | Excel Discussion (Misc queries) | |||
Using "Cells" to write "Range("A:A,H:H").Select" | Excel Programming | |||
Any way to "Save As" without setting the archive bit on original file | Excel Programming |