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
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
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
excelent wrote:
> Range("M14:O14").EntireColumn.Delete
or even EntireRow
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
do you mean this?
Sub delrows()
Rows("17:19").Delete
'or
'Rows(17).Resize(3).Delete
End Sub
--
Don Guillett
SalesAid Software
dguillett1@austin.rr.com
"Dan" <Dan@discussions.microsoft.com> wrote in message
news:B8DFB432-E02C-4C52-9044-22D25F5C27D6@microsoft.com...
> 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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks