+ Reply to Thread
Results 1 to 6 of 6

More than and Less than not working properly

  1. #1
    Registered User
    Join Date
    03-20-2015
    Location
    birm
    MS-Off Ver
    2013
    Posts
    41

    More than and Less than not working properly

    Hi

    I have the following snippet to delete and modify rows based on cell values in column I

    For some reason it doesn't format/delete 'some' rows

    Tends to leave about 10 percent of the (random) rows untouched - with both those above 55 and and below 44

    Checked the number type of these cells and they are no different from the others.

    Its a bit mind boggling....

    Please Login or Register  to view this content.
    Last edited by Alidamalang110; 06-23-2015 at 05:28 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,087

    Re: More than and Less than not working properly

    Try going from the bottom up:

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    03-20-2015
    Location
    birm
    MS-Off Ver
    2013
    Posts
    41

    Re: More than and Less than not working properly

    Thanks TMS that worked perfects, just wondering why it wouldn't work the first time?

    Regards

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,087

    Re: More than and Less than not working properly

    You're welcome. Thanks for the rep.

    When you work from the top, and you delete a row, everything moves up. So, subsequent rows are no longer where they were when you started. So, effectively, you can end up skipping rows, particularly rows that match the conditions.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

  5. #5
    Registered User
    Join Date
    03-20-2015
    Location
    birm
    MS-Off Ver
    2013
    Posts
    41

    Re: More than and Less than not working properly

    Thank you TMS really appreciate the explanation.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,087

    Re: More than and Less than not working properly

    No problem.

+ 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] IF-THEN-ELSE not working properly
    By danex in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-02-2013, 11:15 AM
  2. Listbox not working properly
    By jeff_kaufman in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-20-2013, 11:48 AM
  3. VBA not working properly
    By stevemills04 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-26-2013, 02:56 PM
  4. UDF not working properly
    By demuro1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-09-2008, 04:36 PM
  5. CNTRL + END is not working properly
    By Dave Peterson in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2005, 06:05 AM

Tags for this Thread

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