delete rows with empty cells throughout the data

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
 
B

Bernie Deitrick

gr,

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

HTH,
Bernie
MS Excel MVP
 
G

Guest

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---
 
R

rutski

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top