Advise on Autofilter

L

Les Stout

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 ***
 
P

paul.robinson

Hi
Works for me. You need column headers in N1:p1, not data - so your data
starts in row 2.
regards
Paul
 
D

Dave Peterson

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.
 
L

Les

Thank you so much Dave, that did the trick 100%


Dave said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top