Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

help on Autofilter

Posted on 2014-12-18
4
Medium Priority
?
74 Views
Last Modified: 2014-12-18
can an Expert help me out with this

I have code that autofilters then does some copying and pasting the first part of the code is

Dim myRange
ActiveSheet.Range("$A:$T").AutoFilter Field:=18, Criteria1:="<=15"

then I need to loop this to autofilter on Field 20 but I realise I can't use

ActiveSheet.Range("$A:$T").AutoFilter Field:=20, Criteria1:="<=15"

as I get Autofilter method of Range class failed.

Thanks
0
Comment
Question by:Jagwarman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 24

Accepted Solution

by:
Phillip Burton earned 2000 total points
ID: 40507281
It works for me (see attached).
EE141218.xlsm
0
 

Author Comment

by:Jagwarman
ID: 40507301
That is very bizzare. as you say it works in your spreadsheet but not in mine I will have to investigate further
0
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40507307
Maybe post your spreadsheet.

Is there a heading in cell S1 (i.e. is the table continuous)?
0
 

Author Comment

by:Jagwarman
ID: 40508614
Hi Phillip

thanks for the use of your brain. Not sure what it was but by removing the filters completely and then running the code it works.

Have a good Xmas
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

609 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