Removing blank rows from a range.

dex2612

New Member
Joined
Nov 6, 2012
Messages
17
Really hoping someone could help me with this. i need to remove any rows that have empty cells from column E-J.

This is probably something the filter could do but i just haven't quite figured it out.

Thank you in advance,
Dex

-using excel 10
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Do all cells in the row from column E-J need to be blank or is it just if any blank cells exist in that range then delete?
 
Upvote 0
Try this macro, you'll need to adjust sheet names etc to suit your needs

Code:
Sub EJDel()


Dim lst As Long
Dim i, j As Long
Dim BlkCnt As Integer


lst = Sheet2.UsedRange.Rows.Count


For i = lst To 2 Step -1
    For j = 5 To 10
        BlkCnt = 0
        
        If Cells(i, j) <> "" Then BlkCnt = BlkCnt + 1
            
    Next j
    
    If BlkCnt = 0 Then Range("E" & i).EntireRow.Delete
    
Next i


End Sub
 
Upvote 0

Forum statistics

Threads
1,214,431
Messages
6,119,457
Members
448,898
Latest member
drewmorgan128

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top