L
Lift Off
I've been using this code to delete rows based upon data in one column.
How do I modify the code to include a second column? i.e. delete th
row if "either" column "M" _or_ "N" is empty. I've tried changing th
Range to ("M:M", "N:N") and it doesn't work.
On Error Resume Next
Intersect(Rows("2:" & Rows.Count)
Range("M:M").SpecialCells(xlBlanks, _
xlTextValues)).EntireRow.Delete
Intersect(Rows("2:" & Rows.Count)
Range("M:M").SpecialCells(xlConstants, _
xlTextValues)).EntireRow.Delete
Intersect(Rows("2:" & Rows.Count)
Range("M:M").SpecialCells(xlFormulas, _
xlTextValues + xlErrors + xlLogical)).EntireRow.Delete
On Error GoTo 0
Thanks for the help
How do I modify the code to include a second column? i.e. delete th
row if "either" column "M" _or_ "N" is empty. I've tried changing th
Range to ("M:M", "N:N") and it doesn't work.
On Error Resume Next
Intersect(Rows("2:" & Rows.Count)
Range("M:M").SpecialCells(xlBlanks, _
xlTextValues)).EntireRow.Delete
Intersect(Rows("2:" & Rows.Count)
Range("M:M").SpecialCells(xlConstants, _
xlTextValues)).EntireRow.Delete
Intersect(Rows("2:" & Rows.Count)
Range("M:M").SpecialCells(xlFormulas, _
xlTextValues + xlErrors + xlLogical)).EntireRow.Delete
On Error GoTo 0
Thanks for the help