+ Reply to Thread
Results 1 to 5 of 5

Deleting a group of rows

  1. #1
    Dan
    Guest

    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. #2
    excelent
    Guest

    RE: 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. #3
    Paul Lautman
    Guest

    Re: Deleting a group of rows

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


    or even EntireRow



  4. #4
    Jim Thomlinson
    Guest

    RE: 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. #5
    Don Guillett
    Guest

    Re: 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
    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




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1