Filtering out blank rows

Filtering out blank rows

September 28, 2017

Bugmonsta has posted a useful VBA code here, that you can use to filter out rows in an Excel area that are completely blank.

 

Sub Macro1()
'
' Macro1 Macro

    Rows("1:1").Select
    Selection.AutoFilter
    ActiveSheet.Range("$A$1:$F$15").AutoFilter Field:=1, Criteria1:="<>"
    Range("A1").Select
End Sub

 

 

In this example we have a spreadsheet with data that includes some blank rows. 

 

 

Press ALT + F11 to go into Visual Basic, and insert the code in a new module:

 

 

 You'll need to edit the code so the ActiveSheet.Range specified matches the data on your worksheet. 

 

Run the macro and all rows in the array which are entirely blank will be filtered out.

 

 

 

Please reload

Some elements on this page did not load. Refresh your site & try again.

Contact Me With Your Litigation Support Questions:

seankevinoshea@hotmail.com

  • Twitter Long Shadow

© 2015 by Sean O'Shea . Proudly created with Wix.com