+ Reply to Thread
Results 1 to 6 of 6

Systematically Delete Rows

  1. #1
    Registered User
    Join Date
    09-12-2009
    Location
    Miami, Florida
    MS-Off Ver
    Excel 2010
    Posts
    33

    Systematically Delete Rows

    Hey Folks,

    I got a really huge time series data set that I would like to reduce by 80%.

    The dates are in column A and the values are in column C.

    I'd like to keep rows 1, 6, 11,16, ... And delete Rows 2, 3, 4, 5, 7, 8, 9, 10, ...

    I'm guessing there's some really simple way to do this that I just don't know about.
    Last edited by lamkoid; 10-17-2009 at 07:46 PM.

  2. #2
    Forum Contributor trucker10's Avatar
    Join Date
    07-22-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003 / 2007 / 2010 prof +
    Posts
    149

    Re: Systematically Delete Rows

    A very good site to do that http://www.ozgrid.com/VBA/row-delete-criteria.htm

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Systematically Delete Rows

    Here's one way:
    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Systematically Delete Rows

    non vba is to put in a spare column row 1
    =MOD(ROW()+4,5)>0
    drag down
    auto filter on true
    then delete entire visible rows
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Forum Contributor trucker10's Avatar
    Join Date
    07-22-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003 / 2007 / 2010 prof +
    Posts
    149

    Re: Systematically Delete Rows

    I modify the code from shg
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    09-12-2009
    Location
    Miami, Florida
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Systematically Delete Rows

    Hey trucker10,

    That worked like a charm.

    martindwilson's non vba was what I originally had in mind, but the Macro you and shg put together was a snap.

    Thanks all for the great lessons in Excel programing!

+ 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