ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Deleting results of an AutoFilter excluding top row (https://www.excelbanter.com/excel-discussion-misc-queries/69021-deleting-results-autofilter-excluding-top-row.html)

Shirley Munro

Deleting results of an AutoFilter excluding top row
 

Hi

I am recording a macro which performs a series of task. One of these
tasks is to filter out all the cells which are blank in column C. Once
the filter has been applied, I want to delete all the rows containing
blanks in column C with the exception of row A which contains my
headings.

Any suggestions would be much appreciated.

Shirley Munro


--
Shirley Munro
------------------------------------------------------------------------
Shirley Munro's Profile: http://www.excelforum.com/member.php...nfo&userid=836
View this thread: http://www.excelforum.com/showthread...hreadid=507651


Bob Phillips

Deleting results of an AutoFilter excluding top row
 
Before the filter set a range like so

Set rng = Range(Range("A2"), Cells(Rows.Count,"A").End(xlUp))

then after the filter, do

rng.SpecialCells(xlCellTypeVisible).Delete

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Shirley Munro"
wrote in message
news:Shirley.Munro.22luly_1138888801.7238@excelfor um-nospam.com...

Hi

I am recording a macro which performs a series of task. One of these
tasks is to filter out all the cells which are blank in column C. Once
the filter has been applied, I want to delete all the rows containing
blanks in column C with the exception of row A which contains my
headings.

Any suggestions would be much appreciated.

Shirley Munro


--
Shirley Munro
------------------------------------------------------------------------
Shirley Munro's Profile:

http://www.excelforum.com/member.php...nfo&userid=836
View this thread: http://www.excelforum.com/showthread...hreadid=507651





All times are GMT +1. The time now is 01:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com