Judging by the number of rows, you don't want to do the manual method. Here's some macro code, but it will only clear one row at a time so you need to run it once for each row affected. You can set up a macro button to make that happen more easily. Note, I forced this to only look in column A so you don't accidentally clear data from other areas of the sheet. Also, I set it to clear the row. If you really meant to delete the row, just change the word "clear" to "delete". Sub RemoveTotalRows() Columns("A:A").Select On Error Resume Next Selection.Find(What:="Total", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).EntireRow.Clear Range("a1").Select End Sub Edit: put the word Total in A1 (insert a row if you need to so this is the only thing on that row). You'll note that will be the last row that will be cleared. Once it is gone, then you know the macro has cleared everything.
Edited by Omar 12/18/2014 18:28
|