+ Reply to Thread
Results 1 to 12 of 12

How to delete 99 out of 100 rows easily?

  1. #1
    Registered User
    Join Date
    09-26-2014
    Location
    DK
    MS-Off Ver
    Excel 2011
    Posts
    3

    How to delete 99 out of 100 rows easily?

    I have a dataset with unnecessarily many data points, hence I want to compress it by reducing it to about 1% of the original data points

    Is there any easy way to do this? (I'm a complete novice!)

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: How to delete 99 out of 100 rows easily?

    Yes, but it depends on how simple the logic is to determine if it should remain or be deleted.
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,178

    Re: How to delete 99 out of 100 rows easily?

    Please Login or Register  to view this content.
    Last edited by alansidman; 09-26-2014 at 03:27 PM.

  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: How to delete 99 out of 100 rows easily?

    if you say want say points 1,101,201........
    then something like
    =INDEX($A$2:$A$10000,ROWS($1:1)*100-99) filled down
    "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
    Registered User
    Join Date
    09-26-2014
    Location
    DK
    MS-Off Ver
    Excel 2011
    Posts
    3

    Re: How to delete 99 out of 100 rows easily?

    None of the described methods seems to work - martindwilson could you expand on yours?

    (Obviously I could delete 99 manually bit by bit - but it would take day to get through the data)

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    24,003

    Re: How to delete 99 out of 100 rows easily?

    What is your criteria to remove the rows?
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  7. #7
    Registered User
    Join Date
    09-26-2014
    Location
    DK
    MS-Off Ver
    Excel 2011
    Posts
    3

    Re: How to delete 99 out of 100 rows easily?

    I'm not sure I follow - I have rows like this

    111100 - 12
    111150 - 12
    111200 - 12
    111250 - 12
    Etc..

    I basically just want to get rid og 99 for each 100 row (the data is far to expanded for my needs)

  8. #8
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: How to delete 99 out of 100 rows easily?

    All the rows are different so how do you determine what to keep and what to delete? There must be some criteria otherwise your data doesn't mean much after the deletion.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  9. #9
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: How to delete 99 out of 100 rows easily?

    Guys, I think there is no criteria for deleting rows he simply wants a (random?) subset so wants to keep 1 in every 100 rows to reduce list length to 1% of original.

    To the OP - Mr Wilsons solution won't delete any rows but if your data is in column A then put his formula in columnB and copy down and you'll get A1 in B1, A101 in B2, A201 in B3 etc which will give you the compressed list without the need to delete any of your data. You can then copy this short list for whatever needs you have for it.
    Happy with my advice? Click on the * reputation button below

  10. #10
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to delete 99 out of 100 rows easily?

    Quote Originally Posted by Crooza View Post
    Guys, I think there is no criteria for deleting rows he simply wants a (random?) subset so wants to keep 1 in every 100 rows to reduce list length to 1% of original.

    ...that being the case and say the list is 100,000 rows isn't the simplest way to hit the F5 key, Goto A99000, hold the shift key down, end up to select all the 99,000 rows and hit delete.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  11. #11
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: How to delete 99 out of 100 rows easily?

    @ Richard Buttrey

    Your solution sounds completely reasonable to me. Scale it according to the number of records and eh voila!

  12. #12
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: How to delete 99 out of 100 rows easily?

    reduce list to smaller list using random selection.xlsm
    Richard. That's a simple approach - I like it - sometimes the simple approach is the best

    I got bored so wrote this. You can enter the %age in d1 (10% is a 90% reduction) and using the dummy data in column A will return random (unique) values from the list in accordance with the percentage requested. The bigger the number (the lower the reduction ) the longer it will take as it is looking randomly for unique values so no duplicates so if it finds a duplicate it keeps looking. That's not to say you won't get duplicate data (just not duplicate rows), Column B is the row number and column c is the corresponding data for the respective row in A

+ 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. Easily copying rows from one sheet to another
    By Anteater in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-15-2012, 07:16 PM
  2. Replies: 1
    Last Post: 01-25-2012, 04:29 AM
  3. [SOLVED] How to delete lots same datas easily leaving one from each
    By oogii in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-01-2011, 09:44 PM
  4. How to easily delete unwanted data
    By floricita in forum Excel General
    Replies: 1
    Last Post: 07-06-2010, 10:09 AM
  5. How can I delete a row from all worksheets in a workbook easily?
    By Tom in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-09-2006, 10:25 AM

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