The accepted answer doesn't work for groups of non-consecutive rows to be deleted. Specifically, selecting all rows using ctrl-a includes the hidden rows in selection, so hidden steps would be deleted in step 7 as well.
I sometimes use the reordering tip from another answer.
My workaround, though would be to do steps 1-6 from the accepted answer, then ctrl-c, ctrl-n, ctrl-v, ctrl-s to save the selection in a new spreadsheet. That may lose some formatting like column widths, though.
The whole procedure:
- Select a cell in Column M.
- Select all cells in the spreadsheet with Ctrl-A.
- Open the Data->Filter->Standard Filter menu.
- Set the first row of the filter so that Field Name is "Column M", Condition is "Not Equals" and Value is "on".
- Click OK to apply the filter to the spreadsheet.
- Select all rows in the spreadsheet with Ctrl-A. To unselect any column header cells, hold Ctrl and click the appropriate row.
- Ctrl-c to copy the selection.
- Ctrl-n to open a new, empty spreadsheet.
- Ctrl-v to paste the selection.
- Ctrl-s to save the new spreadsheet with just the filtered data.