Solved

Filter criteria (Series_Name) is not recognized

Posted on 2013-12-02
1
255 Views
Last Modified: 2013-12-03
Dear Experts,

I am trying to create a macro that will sort all the functions in the "Functional Area" column of a table called InitiativeTbl. All the functions should be selected except for the Series_Name (which is defined as cell C8 from the "Cover" sheet).
I have the following macro but it doesn't recognize the Series_Name criteria.

Sub Macro3()
'
' Macro1 Macro
'
Dim Series_Name As String

    Series_Name = Range("Cover!$C$8").Value

    With Sheets("Initiative Summary").ListObjects("InitiativeTbl")
        .Range.AutoFilter field:=.ListColumns("Functional Area").Index, Criteria1:="<>Series_Name", Operator:=xlFilterValues
   
    End With
   
End Sub

Once I change the criteria to an actual function from the column, the macro works.
Could you please help me figure this out.

Thank you.
0
Comment
Question by:jmac001
1 Comment
 
LVL 33

Accepted Solution

by:
Rob Henson earned 500 total points
ID: 39691138
Try changing to:

Criteria1:="<>"&Series_Name

Thanks
Rob H
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question