Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Script to make my life easier??
Hello from a new forum user. Can anybody help? I would like to automat
the process of deleting a series of lines from a spredsheet. The line that need to be delted, have a field entiltled "Date of Leaving", and need to remove any rows where the date in this column occurs before 1s April 2003. Any help would be greatly appreciated. Thanks guy -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Script to make my life easier??
Try this one with the dates in Column A
Sub Delete_with_Autofilter() Dim DeleteValue As String Dim rng As Range DeleteValue = "<4/1/2003" With ActiveSheet .Columns("A").AutoFilter Field:=1, Criteria1:=DeleteValue With ActiveSheet.AutoFilter.Range On Error Resume Next Set rng = .Offset(1, 0).Resize(.Rows.Count - 1, 1) _ .SpecialCells(xlCellTypeVisible) On Error GoTo 0 If Not rng Is Nothing Then rng.EntireRow.Delete End With .AutoFilterMode = False End With End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "dvshooter " wrote in message ... Hello from a new forum user. Can anybody help? I would like to automate the process of deleting a series of lines from a spredsheet. The lines that need to be delted, have a field entiltled "Date of Leaving", and I need to remove any rows where the date in this column occurs before 1st April 2003. Any help would be greatly appreciated. Thanks guys --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help with a procedure to make things easier | Excel Discussion (Misc queries) | |||
Make easier to use formula's / have better / useful examples | Excel Discussion (Misc queries) | |||
Please make it easier to access the IS functions (e.g., isblank) . | Excel Worksheet Functions | |||
Need a formula that would make life easier | New Users to Excel | |||
Need a formula that would make life easier | Excel Worksheet Functions |