+ Reply to Thread
Results 1 to 3 of 3

delete rows in a patterned sequence

  1. #1
    Registered User
    Join Date
    05-21-2007
    Posts
    2

    Question delete rows in a patterned sequence

    I have a worksheet with about 15,000 lines of data. I wish to retain every fourth row, and delete those in between. So, for example, I wish to retain rows 27, 31, 35, 39, etc., and delete what are now rows 28-29-30, 32-33-34, etc. I do not want blank rows appearing in the final, edited version. Is there a simple way to do this?

    Thanks!

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    This link may help

    http://www.mcgimpsey.com/excel/deleteeverynthrow.html

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    This procedure will leave every 4th row, deleting the 3 rows in between, based on a couple of assumptions. First, it starts at the last row in the spreadsheet that has a value. Second, the row above the last row in the spreadsheet that has a value will be the first row that is deleted. Third, it will repeat until it gets to row 1. Let me know if you need assistance modifying any of these assumptions to fit your need.
    Please Login or Register  to view this content.
    HTH

    Jason

+ 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