delete rows with empty cells throughout the data

  • Thread starter Thread starter rutski
  • Start date Start date
R

rutski

How would i delete the rows of data if any of the cells are empty for
say a range a1 to i400?

thanks,

gr
 
gr,

Range("A1:I400").SpecialCells(xlCellTypeBlanks).EntireRow.Delete

HTH,
Bernie
MS Excel MVP
 
This will delete the entire row if the cell in ColumnA is blank:
Sub delete_rows()
Dim RowNdx As Long
Dim LastRow As Long
LastRow = ActiveSheet.UsedRange.Rows.Count
For RowNdx = LastRow To 1 Step -1
If Cells(RowNdx, "A").Value = "" Then
Rows(RowNdx).Delete
End If
Next RowNdx
End Sub


Regards,
Ryan---
 
This will delete the entire row if the cell in ColumnA is blank:
Sub delete_rows()
Dim RowNdx As Long
Dim LastRow As Long
LastRow = ActiveSheet.UsedRange.Rows.Count
For RowNdx = LastRow To 1 Step -1
If Cells(RowNdx, "A").Value = "" Then
Rows(RowNdx).Delete
End If
Next RowNdx
End Sub

Regards,
Ryan---

thanks ryguy
 
Back
Top