Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Delete Superflous Rows (Excel 2000/2003)

    Hi

    I need to delete rows which seperate the record numbers ie 51 to 65 and and 115 to 130 and so on.

    I would like to end up with just sequential record no's

    There are a lot more rows than shown here, hence the need for automation.

    Please see attached

    Many Thanks in advance


    Braddy
    If you are a fool at forty, you will always be a fool

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Delete Superflous Rows (Excel 2000/2003)

    A manual method:

    - Select the entire used range of the worksheet.
    - Sort on column D (List).
    - The superfluous rows will now grouped together be at the bottom. Delete them.
    - Sort the remaining data on column A (Record).

    A macro:

    Sub RemoveSuperfluousRows()
    Dim r As Long
    Dim n As Long
    Application.ScreenUpdating = False
    n = Range("D65536").End(xlUp).Row
    For r = n To 2 Step -1
    If Range("D" & r) = "" Then
    Range("D" & r).EntireRow.Delete
    End If
    Next r
    Application.ScreenUpdating = True
    End Sub

  3. #3
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Delete Superflous Rows (Excel 2000/2003)

    Hi Hans

    As ever I am deeply in your debt.

    Many Thanks

    Braddy
    If you are a fool at forty, you will always be a fool

Posting Permissions

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