+ Reply to Thread
Results 1 to 5 of 5

VBA to delete rows with different criteria (specifically numbers in a range)

  1. #1
    Registered User
    Join Date
    10-29-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    80

    VBA to delete rows with different criteria (specifically numbers in a range)

    Hello experts

    Looking for some help writing some VBA to delete rows in column B.

    I found some VBA on google that allows to specifiy multiple criteria such as blanks or specific text, but I'm stuck on how to specifiy a list of criteria as below:

    In my case looking to delete a row where column B contains any number between 5000 and 5999 inclusive and specific text "M110", "M111",3255BM1"

    Many thanks

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: VBA to delete rows with different criteria (specifically numbers in a range)

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: VBA to delete rows with different criteria (specifically numbers in a range)

    Maybe
    Please Login or Register  to view this content.
    If this doesn't work, please supply a sample file

  4. #4
    Registered User
    Join Date
    10-29-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    80

    Thumbs up Re: VBA to delete rows with different criteria (specifically numbers in a range)

    That works perfectly. Thankyou very much.

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: VBA to delete rows with different criteria (specifically numbers in a range)

    You're welcome & thanks for the feedback

+ 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. Rows delete formula as per range of cell values with counter to delete # rows
    By qureshi2016 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-03-2017, 09:35 AM
  2. [SOLVED] if the rows containing specific text are hidden, delete a specifically named ole object
    By Willardio in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-24-2012, 02:36 PM
  3. Macro, autofilter, delete rows outside date range, defined names as criteria
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-30-2011, 04:10 AM
  4. delete rows in a range by criteria
    By ccsmith in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-09-2011, 11:04 AM
  5. Delete Rows Multiple Criteria w/Numbers
    By eriknokc in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-23-2009, 07:33 PM
  6. Delete specific rows, creating range and criteria using inputbox
    By gmccray in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-15-2008, 02:00 PM
  7. Auto Filter Delete Rows by Criteria Doesn't Work Range To Complicated
    By robertjtucker in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-29-2005, 01:05 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