Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do I copy, for invalid date or date gretar than today, the Entire
row to the InvalidDates Worksheet Looking for proper syntax. Help appreciated. Dim rCell As Range Dim myRow As Long For Each rCell In Range("Z2:Z" & _ Range("Z" & Rows.Count).End(xlUp).Row) With rCell If IsDate(.Value) Then _ .Offset(0, -1).Value = Right(Format(.Value, "YYMM"), 3) 'If Date is greater than Today, Copy Entire row to Invalid Dates worksheet & Delete Entire Row 'If ActiveCell.Value Now() ' myRow = Sheets("InvalidDates").Cells(Rows.Count, 3).End(xlUp)(2).Row ' Intersect(Target.EntireRow, ActiveSheet.UsedRange).Copy ' Entire.row.Delete Else ' myRow = Sheets("InvalidDates").Cells(Rows.Count, 3).End(xlUp)(2).Row ' Intersect(Target.EntireRow, ActiveSheet.UsedRange).Copy '.Entire.row.Delete End If End With Next rCell |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Compare and then copy cell to separate worksheet | Excel Worksheet Functions | |||
Sort by even and odd digits and copy to separate worksheet | Excel Worksheet Functions | |||
Copy specific records from a worksheet to another | Excel Worksheet Functions | |||
copy specific records to new worksheet | Excel Programming | |||
How do I copy each row from 1 Worksheet to separate Worksheets? | Excel Discussion (Misc queries) |