Let say I have a bunch of formatted data in my Excel sheet, and in Column A I have a dates. Then I wanna filter all the data base on certain date, for example 1 Jan 2009, and delete all others data before that date.
The algorithm is like this: I’ll create a loop from the first row until the last row with data and check if the date is before Jan 1st, 2009 or not, if it is, simply delete that row.
Sub DeleteFilteredRows()
Dim i As Long
For i = 1 To Cells.SpecialCells(xlCellTypeLastCell).Row
Debug.Print Cells(i, "A").Value
If CDate(Cells(i, "A")) < CDate("1/jan/2009") Then
Cells(i, "A").EntireRow.Delete
End If
Next i
End Sub
Of course I’ll make an adjustment to the code above to meet my current condition.
FIN.
This macro will delete all rows that contain a date before August 1, 2008.
Pingback: Q1 2009 Wrap up - Code For Excel And Outlook Blog
Pingback: Q1 2009 Wrap up
It returns a run-time error 1004, plz help
Pingback: My Homepage
Pingback: elektrische Zahnbürste
Pingback: reverse mortgage costs
Pingback: icdc college online
Pingback: free credit card report
Pingback: boxfresh men line
Pingback: sofas
Pingback: audio visual
Pingback: learn to drive
Pingback: fancy dress
Pingback: golf swing tips
Pingback: hotel parking games
Pingback: www.openofficefreedownload.org
Pingback: keratosis pilaris remedies
Pingback: Verführung
Pingback: watch the super bowl online 2012
Pingback: Savoir mise sous tutelle
Pingback: Alarmanlagen BKH Sicherheitstechnik ist Spezialist für mechatronische Schließsysteme, Schließanlagen, Zutrittskontrolle, Einbruchmelde- u. Videoüberwachungsanlagen, Rettungswegtechnik, Rauchwarnsysteme, Alarmierungssysteme sowie Briefkastenanlagen und Tre
Pingback: apps for kids
Pingback: priority cash advance
Pingback: Landscape Gardeners North London
Pingback: designvox in grand rapids
Pingback: Ares Free Download
Pingback: Audacity Download
Pingback: Open Office
Pingback: bed bath and beyond coupon code
Pingback: best buy coupon code
Pingback: Alternative Energy Projects
Pingback: laser eye surgery risks
Pingback: xenadrine reviews
Pingback: car games
Pingback: i gun app
Pingback: viagra bez recepty
Pingback: tania viagra
Pingback: kamagra
Pingback: cialis
Pingback: water heater maintenance
Pingback: Lastminute Urlaub buchen
Pingback: slushie maker
Pingback: The Smokenator is a great solution for smoking meat on a charcoal grill without the expense of a smoker.
Pingback: brandon tile cleaning
Pingback: cocktailkleider
Pingback: manipulative psychology 101
Pingback: dilandau
Pingback: no deposit bingo sites
Pingback: ariel rebel