+ Reply to Thread
Results 1 to 1 of 1

Best way to scan a column top to bottom summing and deleting whole rows that sum 0?

  1. #1
    Registered User
    Join Date
    07-07-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    1

    Best way to scan a column top to bottom summing and deleting whole rows that sum 0?

    In Excel 2007...

    I'm looking for a function/ macro/ VBA formula that can assist me in scanning one set column (but the numbers vary upon many different one at a time, top to bottom of the specified column. Starting from the top if the two equaled 0, then it would entirely delete Rows 1 and 2 from the spreadsheet. In this particular situation it would be summing positive and negative numbers. It would continue on as a loop through the column until it reached the bottom of the data in the column.
    And it would be even better if there was a formula that would loop back to start at the top of the column after it deleted two rows. This would allow all numbers to be fully tested that come after one another.


    For example (picture attached):
    The formula/ macro/ VBA formula would scan column "F" to logically add F1 and F2 first. If F1 and F2 = 0, then it would delete the entire rows of 1 and 2 from the spreadsheet. And from there it would continue on down column F to add F2 & F3 to see if it equaled 0 and delete rows 2 and 3 if F2 & F3 equaled (But, of course F1 and F2 had not equaled 0 for it compare the original F2 and F3). It would loop all the way to the bottom and deleting rows until it reached the bottom of the data in the column where it would stop the loop.

    Any help would be greatly appreciated.

    Thanks
    Attached Images Attached Images

+ 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