Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 866
Default Deleting a group of rows

Is it possible to use the Rows property to delete a range of rows in one
statement in a macro, or must I use a loop and .Rows(I).Delete for each row
one at a time?

Dan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 695
Default Deleting a group of rows

Range("M14:O14").EntireColumn.Delete



"Dan" skrev:

Is it possible to use the Rows property to delete a range of rows in one
statement in a macro, or must I use a loop and .Rows(I).Delete for each row
one at a time?

Dan

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default Deleting a group of rows

excelent wrote:
Range("M14:O14").EntireColumn.Delete


or even EntireRow


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Deleting a group of rows

As a guess you intended rows not columns...

Range("M14:O14").EntireRow.Delete

Deleting is one of those slow things to do in Excel. You are always better
off to create one single large range area and delete it all at once than to
delete a bunch of rows one at a time. The rows do not have to be continuious
either

Range("A1:A5", "A10:A15").entirerow.delete



--
HTH...

Jim Thomlinson


"excelent" wrote:

Range("M14:O14").EntireColumn.Delete



"Dan" skrev:

Is it possible to use the Rows property to delete a range of rows in one
statement in a macro, or must I use a loop and .Rows(I).Delete for each row
one at a time?

Dan

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Deleting a group of rows

do you mean this?

Sub delrows()
Rows("17:19").Delete
'or
'Rows(17).Resize(3).Delete
End Sub

--
Don Guillett
SalesAid Software

"Dan" wrote in message
...
Is it possible to use the Rows property to delete a range of rows in one
statement in a macro, or must I use a loop and .Rows(I).Delete for each
row
one at a time?

Dan



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
Group rows (or hide rows) like in MS Project Annie1904 Excel Worksheet Functions 2 October 17th 09 05:15 AM
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Links and Linking in Excel 1 November 13th 08 08:44 AM
Deleting a space between a group of Numbers & Letters in a cell Melissa New Users to Excel 6 May 1st 06 01:35 PM
deleting hidden rows so i can print only the rows showing?????? jenn Excel Worksheet Functions 0 October 6th 05 04:05 PM
Deleting minimized Rows in a group Adam G Excel Programming 1 June 21st 04 06:40 PM


All times are GMT +1. The time now is 07:32 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"