Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Filter by macro

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Filter by macro

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

"Rhoswen" wrote:

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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Filter by macro

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.

--
Rick (MVP - Excel)


"Rhoswen" wrote in message
...
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?


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Filter by macro

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!

"Mike H" wrote:

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

"Rhoswen" wrote:

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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro filter puiuluipui Excel Discussion (Misc queries) 4 September 7th 09 01:18 PM
filter macro SteveDB1 Excel Programming 3 March 11th 09 04:35 PM
Do i use a filter or a macro? Anthony Excel Discussion (Misc queries) 2 January 10th 07 11:11 AM
Need macro to filter, create tab on filter and copy/paste Jen[_11_] Excel Programming 1 May 2nd 06 04:45 PM
Need macro to filter, create tab on filter and copy/paste Jen[_11_] Excel Programming 1 May 2nd 06 04:45 PM


All times are GMT +1. The time now is 02:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"