+ Reply to Thread
Results 1 to 5 of 5

Delete Repeating Groups of Rows

Hybrid View

  1. #1
    Registered User
    Join Date
    05-31-2016
    Location
    California
    MS-Off Ver
    2016
    Posts
    10

    Delete Repeating Groups of Rows

    This one should be easy!

    I have a large spreadsheet which is a composite of 100 text files. Each file has a few lines of information followed by a lot of data. I need to delete those few lines of info so that all of the data is back to back. Last time I was here, it was recommended that I use arrays for such a large file. I'm not really sure how to do this, so I'm asking for help!

    I've attached a file containing about the first 1000 lines of my file. The real file is 27,400 lines long. In the attached file, I need to get rid of lines 1 through 17 (it's ok to keep the current, bias, and position headers), then repeat the next time it starts over.

    Thanks in advance!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Delete Repeating Groups of Rows

    Maybe:

    Sub jn83666()
    With Application
        .Calculation = xlCalculationManual
        .ScreenUpdating = False
    End With
    Range("B1:B" & Range("B" & Rows.Count).End(3).row).SpecialCells(4).EntireRow.Delete
    With Application
        .Calculation = xlCalculationAutomatic
        .ScreenUpdating = True
    End With
    
    End Sub

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,523

    Re: Delete Repeating Groups of Rows

    Probably 1 simple line
        Columns("B:B").SpecialCells(xlCellTypeBlanks).EntireRow.Delete

  4. #4
    Registered User
    Join Date
    05-31-2016
    Location
    California
    MS-Off Ver
    2016
    Posts
    10

    Re: Delete Repeating Groups of Rows

    That worked perfectly. Thank you so much!

    Edit: Actually both of your answers worked perfectly. Thanks a lot guys!

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Delete Repeating Groups of Rows

    You're welcome. Glad to help out and thanks for the feedback. If you are satisfied with the solutions provided please mark this thread as SOLVED. Click Thread Tools above your first post, select "Mark your thread as Solved". Or click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Repeating Groups of Numbers
    By stevejay6 in forum Excel General
    Replies: 2
    Last Post: 09-17-2015, 03:27 PM
  2. Replies: 2
    Last Post: 08-12-2015, 07:11 PM
  3. How to Delete Repeating Values in Many Rows?
    By sadrap in forum Excel General
    Replies: 1
    Last Post: 01-06-2013, 12:49 PM
  4. [SOLVED] Repeating a date difference formula to groups of varying size.
    By cput in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-23-2012, 08:38 PM
  5. Delete repeating heading rows
    By xyz123 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-21-2008, 06:32 AM
  6. AutoFill for Repeating Groups of Numbers
    By Jonezee1 in forum Excel General
    Replies: 2
    Last Post: 09-27-2008, 10:47 PM
  7. delete repeating rows
    By aledger in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-04-2005, 05:06 PM

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