+ Reply to Thread
Results 1 to 12 of 12

delete unnecessary rows

  1. #1
    Registered User
    Join Date
    01-29-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    70

    delete unnecessary rows

    Hi guys!

    I just want to ask what codes could delete the rows with zeros? Please note that the data set is just a sample and I will be handling more bulks of data like these so the code should not be restricted to the number of cells in the attached excel file.

    Thanks in advance!
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: delete unnecessary rows

    Hi moniquem,

    Try something like this:
    Please Login or Register  to view this content.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    01-29-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    70

    Re: delete unnecessary rows

    I am trying it but it already took 15 minutes and it is still having a hard time processing.

  4. #4
    Registered User
    Join Date
    01-29-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    70

    Re: delete unnecessary rows

    What's wrong with this? It takes forever to process. It's still not working

  5. #5
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: delete unnecessary rows

    maybe so
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    01-29-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    70

    Re: delete unnecessary rows

    Dear nilem, run time error occurs when I use the code.

  7. #7
    Registered User
    Join Date
    01-29-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    70

    Re: delete unnecessary rows

    Dear MarvinP,
    Thank you for the code. I was able to understand the code, thank you very much for that, but I really wonder why it's not working for the other data sets. After 15 min. processing, it worked for the sample I've given..but for more bulky data sets, the time takes much longer.

  8. #8
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: delete unnecessary rows

    Hm... I can not reproduce the error. Try again
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    01-29-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    70

    Re: delete unnecessary rows

    The problem with the code is that it arranges the data into ascending order, but the data should not be sorted. The rows with zeros should be deleted but the rows with true values should retain their order.

  10. #10
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: delete unnecessary rows

    then try so
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    01-29-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    70

    Re: delete unnecessary rows

    yes, it works! Thank you so much to you, nilem and MarvinP!

  12. #12
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,528

    Re: delete unnecessary rows

    Just for curiosity's sake, will this work for you (on a copy of your workbook)


    Please Login or Register  to view this content.

+ 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