Filter by macro

R

Rhoswen

Is it possible to write a macro that will do an AutoFilter? I need a macro
that will autofilter the same column for the same criteria every time.

Anybody?
 
M

Mike H

Hi,

The simplest way and because of the lack of detail in the question would be
for you to record a macro of yourself doing it or you may be able to build on
this

Range("A1").AutoFilter Field:=1, Criteria1:="JohnDoe"

Mike
 
R

Rick Rothstein

Yes, use the AutoFilter method of the Range object. If you had told us more,
we could have actually constructed the statement for you. Since you didn't,
you will have to look the AutoFilter method up in the help files.
 
R

Rhoswen

Mike,

Not really much more detail to offer. It's as simple as it seems. You're
code is exactly what I needed to build on. Thanks!
 

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

Top