+ Reply to Thread
Results 1 to 3 of 3

Using VBA to AutoFilter Multiple Criteria

  1. #1
    Registered User
    Join Date
    01-16-2013
    Location
    Stratford NZ
    MS-Off Ver
    Exce l2010
    Posts
    2

    Using VBA to AutoFilter Multiple Criteria

    Hi all,

    I am learning about VBA and Macros and am currently struggling with a project. I am sure that it is a simple solution but after days of struggling I have decided to ask for help.

    Attached is a small spreadsheet with 3 Worksheets - Lists, Data and Interface. I have named the ranges and linked the pages and even managed to write some VBA Code to get the Filter Button and Clear Buttons to work.

    I would like for the Filter Button (when clicked) to sort for Invoices between two dates which seems to work ok. I can even filter by invoice number. But alas, the Customer and Product Name filters are just not working and I cannot find the problem. PLEASE could someone help me get this filter to work, so that it can filter not only between the dates but also by Customer, Product Name and Invoice Number respectively??

    I would be so extremely grateful for any help
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: Using VBA to AutoFilter Multiple Criteria

    not clear what you want. can you use PIVOT TABLE. see attached field . data is sheet "data". see sheet "pivot table"
    Attached Files Attached Files
    I am not an expert. better solutions may be available
    [email protected]

  3. #3
    Registered User
    Join Date
    01-16-2013
    Location
    Stratford NZ
    MS-Off Ver
    Exce l2010
    Posts
    2

    Re: Using VBA to AutoFilter Multiple Criteria

    Thank you for your reply Venkat,

    If you have a look at the Interface worksheet - I would like to be able to enter the Start Date (C6), Finish Date (D6), Customer (E6), Invoice Number (F6) and/or Product Name (G6) and then click on the "Filter Data" button so that a VBA macro can automatically filter the
    data into the range C8:I8 below.

    The date filter and invoice number filter seems to be working, but not the Product Name or Customer filters. I think it might have something to do with the coding of the macro "Filterme", but have no idea how to fix it. Any ideas?

+ 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. Autofilter multiple columns with multiple string criteria
    By svalentine91 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-23-2013, 11:26 AM
  2. VBA Autofilter multiple criteria
    By Daduka in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-29-2013, 08:36 AM
  3. [SOLVED] Autofilter with multiple criteria - how to ignore blank criteria
    By MOONDRIFT47 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-31-2012, 12:20 PM
  4. Multiple Criteria for Autofilter using And & Or
    By Wongadob in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-18-2011, 01:39 PM
  5. multiple column , multiple criteria autofilter sort
    By jseufert in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-28-2009, 06:18 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