Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Deleteing rows after a Go to/Filtering

In a macro, I am selecting a Column and then doing a Goto Special
Blanks.

I need to delete that and all following rows in the same macro.

So far I have;
Columns("A:A").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
ActiveCell.Activate

How can I get what row the Active cell is so I can do this;
Rows("???:10000").Select ??? = the Active Row
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp

Many Thanks in advaance!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default Deleteing rows after a Go to/Filtering

I believe a one-liner will delete all blank rows in column A:

Columns("A:A").SpecialCells(xlCellTypeBlanks).Dele te

This will only delete from column A, non of the other columns.

Mike F
"Ron Luzius" wrote in message
...
In a macro, I am selecting a Column and then doing a Goto Special
Blanks.

I need to delete that and all following rows in the same macro.

So far I have;
Columns("A:A").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
ActiveCell.Activate

How can I get what row the Active cell is so I can do this;
Rows("???:10000").Select ??? = the Active Row
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp

Many Thanks in advaance!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Deleteing rows after a Go to/Filtering

That will work sort of..
I actually need to delete the entire row(s) up to and including row 10000.

I did a
Columns("A:X").SpecialCells(xlCellTypeBlanks).Dele te

But as an automated macro (no human intervention), how do I get it to not
ask "Are you sure?"


"Mike Fogleman" wrote in message
. ..
I believe a one-liner will delete all blank rows in column A:

Columns("A:A").SpecialCells(xlCellTypeBlanks).Dele te

This will only delete from column A, non of the other columns.

Mike F
"Ron Luzius" wrote in message
...
In a macro, I am selecting a Column and then doing a Goto Special
Blanks.

I need to delete that and all following rows in the same macro.

So far I have;
Columns("A:A").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
ActiveCell.Activate

How can I get what row the Active cell is so I can do this;
Rows("???:10000").Select ??? = the Active Row
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp

Many Thanks in advaance!





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default Deleteing rows after a Go to/Filtering

Application.DisplayAlerts = False
Columns("A:X").SpecialCells(xlCellTypeBlanks).Dele te
Application.DisplayAlerts = True

Also you may try:

Columns("A:A").SpecialCells(xlCellTypeBlanks).Enti reRow.Delete

Mike F
"Ron Luzius" wrote in message
...
That will work sort of..
I actually need to delete the entire row(s) up to and including row 10000.

I did a
Columns("A:X").SpecialCells(xlCellTypeBlanks).Dele te

But as an automated macro (no human intervention), how do I get it to not
ask "Are you sure?"


"Mike Fogleman" wrote in message
. ..
I believe a one-liner will delete all blank rows in column A:

Columns("A:A").SpecialCells(xlCellTypeBlanks).Dele te

This will only delete from column A, non of the other columns.

Mike F
"Ron Luzius" wrote in message
...
In a macro, I am selecting a Column and then doing a Goto Special
Blanks.

I need to delete that and all following rows in the same macro.

So far I have;
Columns("A:A").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
ActiveCell.Activate

How can I get what row the Active cell is so I can do this;
Rows("???:10000").Select ??? = the Active Row
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp

Many Thanks in advaance!







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleteing some Rows Deepwater Excel Discussion (Misc queries) 1 April 1st 05 06:23 PM
Deleteing Rows Michael Vaughan Excel Programming 2 September 20th 04 09:53 PM
Deleteing Duplicate Rows??? James Excel Programming 13 June 4th 04 03:24 PM
Deleteing Rows Amber[_2_] Excel Programming 3 February 4th 04 06:34 PM
Deleteing Blank Rows Tom Ogilvy Excel Programming 0 August 12th 03 04:29 PM


All times are GMT +1. The time now is 01:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"