Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default deleting rows

Hello

I have a macro which searches row by row for trigger
values which mark the beginning and end of rows to be
deleted.

I can delete these rows one at a time, but would deleting
them at all at one time be better, and if so what would
the code be?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default deleting rows

Hi Eric

Start here
http://www.rondebruin.nl/delete.htm
And post back if you need help


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Eric" wrote in message ...
Hello

I have a macro which searches row by row for trigger
values which mark the beginning and end of rows to be
deleted.

I can delete these rows one at a time, but would deleting
them at all at one time be better, and if so what would
the code be?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default deleting rows

Eric,

Here is a technique using Autofilter

http://www.xldynamic.com/source/xld.Deletingv3.html
Deleting Rows/Columns in VBA - Autofilter

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Eric" wrote in message
...
Hello

I have a macro which searches row by row for trigger
values which mark the beginning and end of rows to be
deleted.

I can delete these rows one at a time, but would deleting
them at all at one time be better, and if so what would
the code be?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default deleting rows

Eric,

As your macro searches for the ranges, give each one a range name, such as
"rng1", "rng2", and "rng3". Then, this code will delete all of the rows at
once:

Application.Union(Range("rng1"), Range("rng2"),
Range("rng3")).EntireRow.Delete

Delete the temporary range names, and you're done.

Stan Scott
New York City


"Eric" wrote in message
...
Hello

I have a macro which searches row by row for trigger
values which mark the beginning and end of rows to be
deleted.

I can delete these rows one at a time, but would deleting
them at all at one time be better, and if so what would
the code be?




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
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Links and Linking in Excel 1 November 13th 08 08:44 AM
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Setting up and Configuration of Excel 1 November 12th 08 06:05 PM
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Excel Worksheet Functions 1 November 12th 08 01:39 PM
Help!! I have problem deleting 2500 rows of filtered rows!!!! shirley_kee Excel Discussion (Misc queries) 1 January 12th 06 03:24 AM
deleting hidden rows so i can print only the rows showing?????? jenn Excel Worksheet Functions 0 October 6th 05 04:05 PM


All times are GMT +1. The time now is 07:50 PM.

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"