Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #16  
Old 07-18-2014, 10:19 AM
jolivanes jolivanes is offline Remove rows less than 10 Windows XP Remove rows less than 10 Office 2007
Advanced Beginner
 
Join Date: Sep 2011
Posts: 91
jolivanes will become famous soon enough
Default

Not tested. Run this after all the other code has finished doing it's thing.


Maybe to test it, run it as a separate macro.

Code:
Sub jolivanes()
    Dim lr As Long, lc As Long, sh As Worksheet
    Application.ScreenUpdating = False
    For Each sh In ActiveWorkbook.Sheets
        If sh.Name<>"Extended Default" And sh.Name<>"Failed Default" Then    '<----- Check spelling and capitalizing of sheet names.
        With sh
            lr = .Cells(.Rows.Count, 4).End(xlUp).Row
            lc = .Cells(1, .Columns.Count).End(xlToLeft).Column
            .Range(.Cells(1, 1), .Cells(lr, lc)).AutoFilter 4, "<11"
            .Range(.Cells(2, 1), .Cells(lr, lc)).SpecialCells(12).EntireRow.Delete
        End With
        sh.AutoFilterMode = False
        End If
    Next sh
    Application.ScreenUpdating = True
End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove rows less than 10 Grouping table rows to prevent individual rows from breaking across pages dennist77 Word 1 10-29-2013 11:39 PM
Remove rows less than 10 Count rows and add blank rows accordingly Hoochtheseal Word VBA 1 01-29-2013 09:23 PM
Remove rows less than 10 rows in word? j2b3 Word Tables 3 07-19-2012 03:59 PM
Remove rows less than 10 merging rows and creating sub-rows gib65 Excel 2 12-09-2011 02:09 PM
Remove rows less than 10 How to remove blank rows from a specified range? Learner7 Excel 1 04-19-2011 02:45 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:58 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft