top of page

Filtering out blank rows


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.


Sean O'Shea has more than 20 years of experience in the litigation support field with major law firms in New York and San Francisco.   He is an ACEDS Certified eDiscovery Specialist and a Relativity Certified Administrator.

​

The views expressed in this blog are those of the owner and do not reflect the views or opinions of the owner’s employer.

​

If you have a question or comment about this blog, please make a submission using the form to the right. 

Your details were sent successfully!

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

bottom of page