+ Reply to Thread
Results 1 to 3 of 3

Remove row containing criteria from a list - not static criteria

  1. #1
    Registered User
    Join Date
    07-25-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    88

    Remove row containing criteria from a list - not static criteria

    Hello,

    I have a macro I use to filter a large file that I receive each day. Each row of data has an identifier in column C, and this is where the macro looks to determine whether or not to remove that row. Currently, my macro will only remove rows in which column C contains any of the following strings: "B0A0", "B0MH", or "SRB". This part of the macro looks like this:

    Please Login or Register  to view this content.
    I want to add additional functionality to this macro. I will always need rows removed where the identifier in column C contains one of these static strings, but there are times when there or other strings that I would like the macro to remove. Ideally, I'd like to have a range on a worksheet where I can type a string of characters in each cell, and the macro will look to this range when removing rows in my large file. How can I modify this existing code to incorporate this?

    Say, for example, that I want to designate the range B2:B50 on Sheet 4 as the range where I want to type these strings.

    Thanks in advance for taking the time to read and for your assistance!

    -Student1990

  2. #2
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Remove row containing criteria from a list - not static criteria

    Try this:-
    Please Login or Register  to view this content.
    Regards Mick

  3. #3
    Registered User
    Join Date
    07-25-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    88

    Re: Remove row containing criteria from a list - not static criteria

    Thank you, Mick. That was exactly what I was looking for. Your modification enables me to use a range as my criteria for filtering. Thanks!

+ 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] Countifs with multiple criteria and one criteria has a list of names
    By Beefy1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-30-2014, 05:25 PM
  2. Replies: 2
    Last Post: 11-06-2012, 06:40 PM
  3. Format Cells based on criteria of static cell
    By Alley oop in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-12-2012, 03:45 AM
  4. Static Multiple Criteria Lookup
    By mohitspamz in forum Excel General
    Replies: 8
    Last Post: 09-21-2009, 11:12 AM
  5. Using a static set of data to use as input criteria
    By cdb in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-16-2006, 12:15 PM

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