+ Reply to Thread
Results 1 to 4 of 4

Delete Rows

  1. #1
    Registered User
    Join Date
    05-02-2009
    Location
    New, New York
    MS-Off Ver
    Excel 2003
    Posts
    31

    Delete Rows

    I posted a similar post earlier this week, got an answer, and marked it as solved. Although the code is awesome its not working in all cases. Here is the code I have currently,

    Please Login or Register  to view this content.
    My goal is to get Sheet1 to look like Sheet2 on the attachment with this post. If you can think of a better way to do this please let me know.

    This might give you an idea of what the macro is doing right now.

    1. Scan Column A for contents. As soon as you find a row with contents look at the same row in Column F. If the value in Column F is greater than or equal to zero delete the row and continue deleting rows until Column A has contents in it again, and repeat the pattern for every row in Column A and Column F.
    Attached Files Attached Files

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

    Re: Delete Rows

    Try this:
    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    05-02-2009
    Location
    New, New York
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: Delete Rows

    This macro is great. There is one stubborn group of rows that has a zero in Column F and they won’t get deleted, even when I run the macro a second time. I’ve spent a lot of time looking at the row trying to figure out why it won’t get deleted but I can’t figure out why.

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

    Re: Delete Rows

    Post an example that demonstrates.

+ 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