Thread: [Solved] Remove rows less than 10
View Single Post
 
Old 07-16-2014, 11:10 AM
jolivanes jolivanes is offline Windows XP Office 2007
Advanced Beginner
 
Join Date: Sep 2011
Posts: 93
jolivanes will become famous soon enough
Default

Or like this
Code:
Sub jolivanes()
Dim lr As Long, lc As Long
    Application.ScreenUpdating = False
    lr = Cells(Rows.Count, 4).End(xlUp).Row
    lc = Cells(1, Columns.Count).End(xlToLeft).Column
        With Range(Cells(1, 1), Cells(lr, lc))
            .AutoFilter 4, "<11"
            .Range(.Cells(2, 1), .Cells(lr, lc)).SpecialCells(12).EntireRow.Delete
        End With
    ActiveSheet.AutoFilterMode = False
    Application.ScreenUpdating = True
End Sub
Attached Files
File Type: xlsm testtoremoverows_A.xlsm (57.5 KB, 9 views)
Reply With Quote