Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting rows, multiple column criteria
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 -- Lift Of ----------------------------------------------------------------------- Lift Off's Profile: http://www.excelforum.com/member.php...nfo&userid=824 View this thread: http://www.excelforum.com/showthread.php?threadid=50686 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Deleting rows meeting certain criteria in a particular column | Excel Discussion (Misc queries) | |||
Deleting several rows with given criteria | Excel Discussion (Misc queries) | |||
deleting multiple rows with multiple criteria | Excel Programming | |||
Deleting rows based on multiple criteria | Excel Programming | |||
Cut rows from one sheet into multiple sheets based on a criteria in first column | Excel Programming |