PC Review


Reply
Thread Tools Rate Thread

Advise on Autofilter

 
 
Les Stout
Guest
Posts: n/a
 
      13th Nov 2006
Hi all, i have put the following in my code:
Range("N1:P1").AutoFilter
It puts the filter in but they do not work correctly ??

Can anybody help ??

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
 
Les Stout
Guest
Posts: n/a
 
      13th Nov 2006
Hi, further to my last message, the filters work if i put filters in the
whole of row 1 ? Is there a rule for this, as if i just put the filter
in the three cells, they do not work ??

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
paul.robinson@it-tallaght.ie
Guest
Posts: n/a
 
      13th Nov 2006
Hi
Works for me. You need column headers in N1:P1, not data - so your data
starts in row 2.
regards
Paul

Les Stout wrote:

> Hi all, i have put the following in my code:
> Range("N1:P1").AutoFilter
> It puts the filter in but they do not work correctly ??
>
> Can anybody help ??
>
> Les Stout
>
> *** Sent via Developersdex http://www.developersdex.com ***


 
Reply With Quote
 
Les
Guest
Posts: n/a
 
      13th Nov 2006
Hi Paul, it is in the header row & my data starts in row 2.

(E-Mail Removed) wrote:
> Hi
> Works for me. You need column headers in N1:P1, not data - so your data
> starts in row 2.
> regards
> Paul
>
> Les Stout wrote:
>
> > Hi all, i have put the following in my code:
> > Range("N1:P1").AutoFilter
> > It puts the filter in but they do not work correctly ??
> >
> > Can anybody help ??
> >
> > Les Stout
> >
> > *** Sent via Developersdex http://www.developersdex.com ***


 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      13th Nov 2006
I try to specify the range that I want the filter applied to:

dim myRng as range
with worksheets("sheet9999")
set myrng = .range("P1:N" & .cells(.rows.count,"P").end(xlup).row)
end with

myrng.autofilter

====
Sometimes if you have gaps in the data/rows, your filter won't do what you
expect.

Les Stout wrote:
>
> Hi, further to my last message, the filters work if i put filters in the
> whole of row 1 ? Is there a rule for this, as if i just put the filter
> in the three cells, they do not work ??
>
> Les Stout
>
> *** Sent via Developersdex http://www.developersdex.com ***


--

Dave Peterson
 
Reply With Quote
 
Les
Guest
Posts: n/a
 
      13th Nov 2006
Thank you so much Dave, that did the trick 100%


Dave Peterson wrote:
> I try to specify the range that I want the filter applied to:
>
> dim myRng as range
> with worksheets("sheet9999")
> set myrng = .range("P1:N" & .cells(.rows.count,"P").end(xlup).row)
> end with
>
> myrng.autofilter
>
> ====
> Sometimes if you have gaps in the data/rows, your filter won't do what you
> expect.
>
> Les Stout wrote:
> >
> > Hi, further to my last message, the filters work if i put filters in the
> > whole of row 1 ? Is there a rule for this, as if i just put the filter
> > in the three cells, they do not work ??
> >
> > Les Stout
> >
> > *** Sent via Developersdex http://www.developersdex.com ***

>
> --
>
> Dave Peterson


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel 2007 autofilter change to 2003 autofilter functionality? jonnybrovo815 Microsoft Excel Misc 1 19th Apr 2010 10:05 PM
2007 excel autofilter back to 2003 autofilter? jonnybrovo815 Microsoft Excel Misc 3 19th Apr 2010 08:11 PM
2007 excel autofilter change back to 2003 autofilter? jonnybrovo815 Microsoft Excel Misc 1 19th Apr 2010 05:53 PM
2007 Autofilter worse than 2003 Autofilter =?Utf-8?B?anNreQ==?= Microsoft Excel Misc 9 31st Oct 2007 12:14 AM
How to Sort within AutoFilter with Protection on (and AutoFilter . =?Utf-8?B?Z2libG9u?= Microsoft Excel Misc 1 16th Feb 2006 12:23 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:40 AM.