Solved

help on Autofilter

Posted on 2014-12-18
4
71 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 500 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

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

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

717 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