Solved

Filter criteria (Series_Name) is not recognized

Posted on 2013-12-02
1
247 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

856 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