Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default How can I specify more than 2 criteria in AutoFilter

Seems the AutoFilter can have at most 2 criteria. I do have a need to have 3
or more criteria to filter out a column of strings. How can I accomplish
this? Thanks!

Felix
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How can I specify more than 2 criteria in AutoFilter


One method is to use an auxillary column for your filtering. You can
put a formula into a new colun the would produce either a True or False
and then you can autofilter on the true or false

for example

In cell Z1
=or(A1="A",A1="D",A1="Z")

then copy formula down column Z to last row of data. Then autofilter
column Z.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=160741

Microsoft Office Help

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default How can I specify more than 2 criteria in AutoFilter

You could add another helper column that contains a formula that evaluates to
true/false. Then filter on that column.

The formula could be as simple as something like:

=or(a2="hi",a2="bye",a2="there")
or this equivalent:
=or(a2={"hi","bye","there"})

Or it could be as complex as you need.

Or you could learn about advanced filtering and criteria ranges.

I'd start at Debra Dalgleish's site:
http://contextures.com/xladvfilter01.html


Felix_Jiang wrote:

Seems the AutoFilter can have at most 2 criteria. I do have a need to have 3
or more criteria to filter out a column of strings. How can I accomplish
this? Thanks!

Felix


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default How can I specify more than 2 criteria in AutoFilter

Use a helper column or switch to 2007. 2007 has a much improved AutoFilter.
--
Gary''s Student - gsnu200909


"Felix_Jiang" wrote:

Seems the AutoFilter can have at most 2 criteria. I do have a need to have 3
or more criteria to filter out a column of strings. How can I accomplish
this? Thanks!

Felix

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
autofilter criteria geebee Excel Programming 3 March 27th 08 05:38 PM
autofilter criteria Knox Excel Programming 3 April 6th 07 01:21 PM
Selection.AutoFilter Field / Criteria = criteria sometimes non-existing on worksheet markx Excel Programming 1 November 24th 06 02:52 PM
Autofilter criteria not yet known JeffMelton Excel Programming 1 July 25th 06 08:12 AM
AutoFilter Criteria VBA EstherJ Excel Programming 2 August 20th 04 12:54 PM


All times are GMT +1. The time now is 05:55 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"