Solved

Filter criteria (Series_Name) is not recognized

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

Accepted Solution

by:
Rob Henson earned 500 total points
Comment Utility
Try changing to:

Criteria1:="<>"&Series_Name

Thanks
Rob H
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Excel and Formulas 8 30
Splitting out Data 14 27
Convert .PDF 6 38
Find the last position of specific character in a cell Excel 7 12
This article will show you how to use shortcut menus in the Access run-time environment.
No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

771 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now