+ Reply to Thread
Results 1 to 8 of 8

Loop doesn't pic all cells to delete by the conditional value - Use another loop type??

  1. #1
    Registered User
    Join Date
    01-25-2018
    Location
    Southeast
    MS-Off Ver
    2016
    Posts
    19

    Loop doesn't pic all cells to delete by the conditional value - Use another loop type??

    Hi all so the below two code snippets will delete the values i've assigned conditionally but it also leaves many cells which would evaluate to true and thus should be deleted.
    Is another loop type needed to resolve this or maybe a starting position for the loop? Thank you

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

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

    Re: Loop doesn't pic all cells to delete by the conditional value - Use another loop type?

    You delete from the bottom upwards, not from the top down.
    If you need an example, let us know. Or Google on how to delete rows in excel.

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

    Re: Loop doesn't pic all cells to delete by the conditional value - Use another loop type?

    This is just an example to chew on.
    If you have a lot of data, there is faster/better ways.
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    01-25-2018
    Location
    Southeast
    MS-Off Ver
    2016
    Posts
    19

    Re: Loop doesn't pic all cells to delete by the conditional value - Use another loop type?

    Believe it or not i've tried many times using example code from Google. I got the above lines from other posts.
    Would you please reply with an example you use? It may help me to understand better.

    Thanks

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

    Re: Loop doesn't pic all cells to delete by the conditional value - Use another loop type?

    Did you see Post #3?

  6. #6
    Registered User
    Join Date
    01-25-2018
    Location
    Southeast
    MS-Off Ver
    2016
    Posts
    19

    Re: Loop doesn't pic all cells to delete by the conditional value - Use another loop type?

    Only 200 lines or so max at this point. I'll give your example a try. Many thanks again

  7. #7
    Registered User
    Join Date
    01-25-2018
    Location
    Southeast
    MS-Off Ver
    2016
    Posts
    19

    Re: Loop doesn't pic all cells to delete by the conditional value - Use another loop type?

    I did not, but now see it.

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

    Re: Loop doesn't pic all cells to delete by the conditional value - Use another loop type?

    Just for the heck of it.
    See attached
    Attached Files Attached Files

+ 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. [SOLVED] second row in loop doesn't always delete. Please Help
    By johndoe15 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-11-2017, 09:42 PM
  2. [SOLVED] Run / loop through cells and delete based on criteria
    By Coeus in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-16-2014, 04:37 PM
  3. Delete certain cells in a range WITHOUT loop.
    By Karlos1544 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-28-2013, 07:52 AM
  4. Loop to delete cells
    By mkeys4 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-29-2013, 09:02 AM
  5. Macro Loop Broken. Detects Max but doesn't continue loop
    By herchenbach in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-21-2011, 12:17 PM
  6. For type loop verse Do type loop
    By boylejob in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-09-2007, 03:02 PM
  7. [SOLVED] Adding a loop to conditional delete code
    By maw via OfficeKB.com in forum Excel - New Users/Basics
    Replies: 21
    Last Post: 08-15-2006, 11:15 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