Deleting blank cells
try the following..... it use column 1 to determine the last used row.
Sub DeleteHIJ()
Dim xlr As Long, xr As Long
xlr = Cells(Rows.Count, 1).End(xlUp).Row ' change this if another column
contains the last used row
For xr = xlr To 1 Step -1
If Len(Cells(xr, 8)) = 0 And Len(Cells(xr, 9)) = 0 And Len(Cells(xr, 10))
= 0 Then
Rows(xr).Delete
End If
Next xr
End Sub
--
Cheers
Nigel
"savbci" wrote in message
...
i have a spreadsheet about 11 columns wide and 10,000rows down.
i want to delete all rows that have columns H, I AND J blank.
IF any one column out of the 3 are blank i do not want the row to be
deleted.
The row is deleted only when the Columns H, I and J are blank in the same
row.
please advise
|