• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Delete whole row in a range when only part of the row is empty

Gandalf

Member
Me again - sorry!

I've attached a worksheet where I want to delete a whole row when only a part of the row is empty. The number of rows is variable and cols A & B always have data (dates). Cells in Cols D to N may or may not have data. I would like to be able to delete the whole row where all cells in Cols D:N are empty.

Thanks in advance
 

Attachments

  • Delete part empty rows.xlsm
    15 KB · Views: 4
According to your attachment a VBA demonstration for starters :​
Code:
Sub Demo1()
    With Range("A3", Cells(Rows.Count, 1).End(xlUp)(1, 14)).Columns
        .Item(3).Formula = "=COUNTA(D3:N3)=0"
     If IsNumeric(Application.Match(True, .Item(3), 0)) Then
        .Sort .Item(3), 1, Header:=2
        .Rows(Application.Match(True, .Item(3), 0) & ":" & .Rows.Count).Clear
     End If
        .Item(3).ClearContents
    End With
End Sub
Do you like it ? So thanks to click on bottom right Like !​
 
Thank you Marc. I was really struggling with this, I think I was trying to make it more complicated than it actually was.
 
Back
Top