# Microsoft Office Application Help - Excel Help forum > Excel General >  >  delete filtered rows without deleting the hidden rows in Excel 2010?

## jdallas

How do I delete filtered rows without deleting the hidden rows in excel 2010?

----------


## martindwilson

simply filter, then select the rows using just the row numbers on the left hand side,then right click /delete,dont try to select say from a2:h20

----------


## jdallas

I tried that and it deleted all of my rows including the hidden rows.  :Frown:

----------


## jdallas

I ended up doing a work around.  adding a "flag" column and putting a Y in it for all the filtered rows.  Then unfiltered, sorted on the flag column so they were all together and then deleting them.

----------


## martindwilson

hmm select range then right click delete whole row should work

----------


## dgouldmba1996

1.  use filter to select the rows you want to delete.  At this point this will include the hidden rows you do not wish to delte
2.  on home ribbon, click find & select> go to special
3.  Check visible cells only.  This will now select only the visible cells that you wish to delete
4.  Click delete>rows

You are done...

Hope this helps

----------


## AnalystND

> 1.  use filter to select the rows you want to delete.  At this point this will include the hidden rows you do not wish to delte
> 2.  on home ribbon, click find & select> go to special
> 3.  Check visible cells only.  This will now select only the visible cells that you wish to delete
> 4.  Click delete>rows
> 
> You are done...
> 
> Hope this helps



I tried this and it worked well. However, it left the blank rows scattered in my data. Since I use this data with a pivot table, I didn't want the blanks - you know the pivot tends to trip over them and show (blank) in some of the fields...

I ended up sorting my data and deleting the unwanted rows in a block. The original dataset was 448 rows and I deleted 110, so this is manageable. I don't know what you would do with a huge dataset.

----------


## Anupma

Hi,
I have faced the same issue in 2007, I tried folowing way it worked:
1. Keep the cursor on header cell eg, I wanted to filter by Product Name so I kept my cursor in Product Name Header.
2. Click on Data>Filter
3.Select Rows Number at Left most
4. Right Click> Delete Rows

Note: If only Delete option is displayed then it will delete hidden rows also, Try and follow steps again the option should be 'Delete Rows'

Please let me know if it worked
Gud Luck

----------


## drink1000cc

Thanks Anupma. Your method works. It deleted filtered rows and left no blank rows in the sheet. This is really useful.

----------


## pATREUS

I know this is an old thread but with the the filtered rows selected (entire rows including row label): *Ctrl + - (minus)* does the same thing.

----------


## FDibbins

pATREUS  welcome to the forum, and thanks for the input  :Smilie:

----------

