+ Reply to Thread
Results 1 to 6 of 6

Problem with Excel Advanced Filters via Excel VBA - Not working

  1. #1
    Registered User
    Join Date
    11-21-2012
    Location
    Oman
    MS-Off Ver
    Excel 2007
    Posts
    2

    Problem with Excel Advanced Filters via Excel VBA - Not working

    I have a sheet that holds all the Data in 28 columns "DataSheet", I have the Criteria on another Sheet where I want the results "ResultSheet"

    I want to exclude the Projects starting with A, the area starting with Y or R and the Team starting with U or P and leave everything else. So conclude Projects or area or area or team or team

    The Criteria which is named as "Criteria" used is
    filter.png

    The code is

    Please Login or Register  to view this content.
    All it does though is copy across the whole DataSheet, it works with only one criteria in any column, and is picking up the Criteria on all rows that have content. Tried putting them all on the same row and it didn't work (gave no results), tried doing it manually and it didn't work. Putting the data as Projects (row 4), Area (both on row 5), team (both on row 6) doesn't work.

    Really stuck. Any help gratefully received, thanks in advance.
    Last edited by amthorpe; 03-28-2021 at 09:45 AM.

  2. #2
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,303

    Re: Problem with Excel Advanced Filters via Excel VBA - Not working

    Welcome to the forum

    Please 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 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,421

    Re: Problem with Excel Advanced Filters via Excel VBA - Not working

    Try, on the Criteria sheet:

    Project Area Area Ref_Ind Ref_Ind
    <>A* <>Y* <>R* <>U* <>P*


    with code:

    Please Login or Register  to view this content.
    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


  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,421

    Re: Problem with Excel Advanced Filters via Excel VBA - Not working

    Or, if the ranges are named:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-21-2012
    Location
    Oman
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Problem with Excel Advanced Filters via Excel VBA - Not working

    Thanks TMS, this seems to have solved it, sure I had already tried that but guess not.

  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,421

    Re: Problem with Excel Advanced Filters via Excel VBA - Not working

    You're welcome.

+ 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. VBA help with Advanced Filters that change with growing excel project list
    By sewed in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-16-2015, 04:19 PM
  2. Working with advanced filters...?
    By BillJo in forum Excel General
    Replies: 7
    Last Post: 03-28-2015, 05:40 PM
  3. Replies: 3
    Last Post: 07-25-2014, 03:43 AM
  4. [SOLVED] Problem with Advanced Filters
    By ps65 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-16-2013, 03:35 PM
  5. Filters in Excel 2003 are not working
    By heather in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-22-2006, 02:35 PM
  6. [SOLVED] Microsoft Excel 2003 - Advanced Filters
    By Kel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-17-2006, 10:10 AM
  7. [SOLVED] How do I use advanced filters in excel?
    By Jessica in forum Excel General
    Replies: 1
    Last Post: 02-05-2006, 08:00 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