+ Reply to Thread
Results 1 to 4 of 4

Select and Delete Every Other Row in Excel Sheet

  1. #1
    Sawyer
    Guest

    Select and Delete Every Other Row in Excel Sheet

    Hello all

    Need to find a Script that would Delete every other row in Excel say starting at Row A1 to Row A100 it would delete A2,A4,A6 and so on

    Thanks

    Scott


  2. #2
    Yngve
    Guest

    Re: Select and Delete Every Other Row in Excel Sheet

    hi
    somthing like this, delete every scecond row

    Sub DeleteRows()
    Dim i As Long, lastrow As Long
    lastrow = Cells(Rows.Count, "A").End(xlUp).Row
    For i = 2 To lastrow Step 2

    Rows(i).Delete

    Next


    End Sub

    Regards Yngve


  3. #3
    Tom Ogilvy
    Guest

    RE: Select and Delete Every Other Row in Excel Sheet

    for i = 100 to 1 step -2
    rows(i).Delete
    Next

    --
    Regards,
    Tom Ogilvy



    "Sawyer" wrote:

    > Hello all
    >
    > Need to find a Script that would Delete every other row in Excel say starting at Row A1 to Row A100 it would delete A2,A4,A6 and so on
    >
    > Thanks
    >
    > Scott
    >


  4. #4
    Sawyer
    Guest

    Re: Select and Delete Every Other Row in Excel Sheet

    I like this one straight to the point and easy to change

    "Tom Ogilvy" <[email protected]> wrote in message
    news:[email protected]...
    > for i = 100 to 1 step -2
    > rows(i).Delete
    > Next
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    >
    > "Sawyer" wrote:
    >
    >> Hello all
    >>
    >> Need to find a Script that would Delete every other row in Excel say
    >> starting at Row A1 to Row A100 it would delete A2,A4,A6 and so on
    >>
    >> Thanks
    >>
    >> Scott
    >>




+ 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