Hi,
I'm trying to only delete the empty rows on a specific sheet, on the codition that if the former cell and latter cell both contain a value then to delete the empty row.
Something just isn't right with my code (below) Any input would be greatly appreciated
![]()
Sub Rwdelete() Dim i As Long Sheet4.Activate For i = 20000 To 2 Step -1 If Not IsEmpty(Cells(i - 1, 1)) And Not IsEmpty(Cells(i + 1, 1)) Then Rows(i).Delete Next i End Sub
Bookmarks