Results 1 to 7 of 7

Thread: Solved: Applying an Advanced Filter Using VBA

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Expert
    Joined
    Feb 2010
    Posts
    696
    Location

    Solved: Applying an Advanced Filter Using VBA

    I am trying to test the following code to apply an advanced filter on an existing database of classmates. The script does nothing except select of the range of cells to be filtered. My criteria range includes "="Attending"" (without the outside quotation marks).

    [vba]
    Sub filterClassmates()
    Worksheets("MyContacts").Activate
    Range("Q3", Range("Q1000").End(xlUp)).Select
    Selection.AdvancedFilter action:=xlFilterCopy, CriteriaRange:=Range("Q1"), CopyToRange:=Worksheets("Test").Range("A3"), Unique:=True
    Worksheets("Test").Activate
    Range("A1").Select
    [/vba]
    What is preventing this filter from working properly?
    Last edited by Opv; 03-29-2010 at 11:56 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •