Solved

help on Autofilter

Posted on 2014-12-18
4
69 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
  • 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

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