+ Reply to Thread
Results 1 to 3 of 3

Find and Delete Rows

  1. #1
    Registered User
    Join Date
    10-07-2013
    Location
    Somewhere, USA
    MS-Off Ver
    Excel 2013
    Posts
    36

    Find and Delete Rows

    Looking for a macro to delete rows where Column A contains a certain value. I've attached a copy of the worksheet (sanitized to remove any personal info). This will be typical application. The goal here is to delete all row based upon the following information, if a row is found to contain that information in column A otherwise move on down the list. While the number list could possibly contain up to 4k lines, in any given scenario only about 300 lines will be used at most.
    5000-5999 Delete
    6000-6899 Keep
    7000-7499 Keep
    7500-8299 Delete
    8400-9599 Delete
    8300-8399 Keep
    9600-9699 Keep
    9700-9999 Delete

    The following macro is one that I have used in the past for a similar idea but not sure how to alter it to run for so many possible numbers.
    Please Login or Register  to view this content.
    Thanks in advance for the help.
    Attached Files Attached Files

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Find and Delete Rows

    Try:
    Please Login or Register  to view this content.
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Registered User
    Join Date
    10-07-2013
    Location
    Somewhere, USA
    MS-Off Ver
    Excel 2013
    Posts
    36

    Re: Find and Delete Rows

    Thanks so much. Edited it slightly for criteria that I didn't know at the time but works like a charm. I never thought to use cases like that. Thanks for opening my eyes to something new.

+ 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. Macro To Find Rows With Duplicates, Compare Cells, And Delete Rows. - Excel
    By Kwame001 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-26-2013, 10:41 AM
  2. Replies: 4
    Last Post: 09-18-2012, 10:54 AM
  3. Replies: 13
    Last Post: 08-23-2011, 11:00 AM
  4. Find a value and delete rows
    By oakman in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-08-2008, 10:01 AM
  5. Find & Delete Rows
    By Steve Wallis in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-17-2005, 03:05 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