+ Reply to Thread
Results 1 to 6 of 6

Macro to delete items below 0.20 including zeroes

  1. #1
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,709

    Macro to delete items below 0.20 including zeroes

    I have the following macro to delete values that are 0.20 and below including zeroes


    Please Login or Register  to view this content.

    However with running the macro, I have a run time error "End with without with"


    It would be appreciated if someone could kindly assist me

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Macro to delete items below 0.20 including zeroes

    The End With is inside a loop.

    Please Login or Register  to view this content.

    Try:

    Please Login or Register  to view this content.

    Sorry Howard.

    How many rows of data do you have?

    If you used a helper column with a formula. You would not need a loop and the macro would be much faster.





    Please Login or Register  to view this content.
    Last edited by mehmetcik; 11-26-2021 at 07:39 AM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,122

    Re: Macro to delete items below 0.20 including zeroes

    Why loop...
    Please Login or Register  to view this content.
    OOPS...Only noticed afterwards mehmetcik...last code snippet is same...
    Last edited by sintek; 11-26-2021 at 09:21 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  4. #4
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,709

    Re: Macro to delete items below 0.20 including zeroes

    Many Thanks for your help. I used your 2nd option using a helper column

    the maximum number of rows will be 800

  5. #5
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,709

    Re: Macro to delete items below 0.20 including zeroes

    Thanks for the help Sinek

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,122

    Re: Macro to delete items below 0.20 including zeroes

    Quote Originally Posted by Howardc1001 View Post
    Thanks for the help Sinek
    Pleasure...Tx for rep + ...Only diff is...One writes formula first then converts to value ... other populates with values directly...

+ 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] Macro to delete certain items then count remaining items #2
    By elgato74 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 12-21-2019, 02:26 PM
  2. [SOLVED] Macro to delete certain items then count remaining items
    By elgato74 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-14-2019, 03:20 PM
  3. [SOLVED] Macro to eliminate zeroes if numbers in column match and both sets of columns have zeroes
    By luajambeiro in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-14-2019, 05:07 PM
  4. [SOLVED] Concatenate 5 cells into a single But including front zeroes or all zeros, e.i 000
    By AndyJr in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-22-2018, 01:22 AM
  5. Replies: 6
    Last Post: 03-17-2016, 12:52 PM
  6. [SOLVED] Macro to create csv file delete leading zeroes
    By abjac in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-20-2015, 04:40 AM
  7. Macro to delete the last row including checkbox and dropdowns on that row
    By ThePanther in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-05-2011, 06:42 PM

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