Macro to delete entire rows where certain range of cells areblank
hi Cameron,
Sub Macro1()
Dim n As Integer, i As Long
For i = Range("A65536").End(xlUp).Row To 1 Step -1
n = Evaluate("CountA(D" & i & ":N" & i & ")")
If n = 0 Then Rows(i).Delete ' or Rows(i).Delete Shift:=xlUp
Next
End Sub
--
isabelle
Le 2012-06-26 07:17, cameron4987 a écrit :
I'm looking for some help. I have looked around online but I can't quite
find the macro I need.
Basically, in a table, every row has a value in Columns A:C.
Certain rows have values from D:N however, some rows are completely
blank between D:N.
What I want to do is completely delete any row in its entirety, if
columns D:N are blank. I have a manual workaround but really a macro is
what I'm looking for.
Can anyone help please!?
|