Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Filter criteria (Series_Name) is not recognized

Posted on 2013-12-02
1
Medium Priority
?
273 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 34

Accepted Solution

by:
Rob Henson earned 2000 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 article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

782 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