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

I need to write a filter criteria with 3 conditions. It seems like m
code doesn't work for 3 criterias. Can somebody help me?

Selection.AutoFilter Field:=12, Criteria1:="=P01", Operator:=xlOr
Criteria2:="=P02", _
Operator:=xlOr, Criteria3:="=BPBT"

Thanks a lot!

Regards

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Filter Criteria

Autofilter does not support 3 criteria - only two. You could create a dummy
column that has a formula like

=if(or(C2="P01",C2="P02",C2="BPBT"),"Show","No Show")

then drag fill that down the column and filter on that column.

If P01 and P02 are the only entries that start with P, you could use two
criteria
Critera1:="=P*"
Criteria2:="=BPBT"

--
Regards,
Tom Ogilvy

"desmondleow" wrote in message
...
I need to write a filter criteria with 3 conditions. It seems like my
code doesn't work for 3 criterias. Can somebody help me?

Selection.AutoFilter Field:=12, Criteria1:="=P01", Operator:=xlOr,
Criteria2:="=P02", _
Operator:=xlOr, Criteria3:="=BPBT"

Thanks a lot!

Regards!


---
Message posted from http://www.ExcelForum.com/



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
Filter with criteria! ernietan Excel Discussion (Misc queries) 1 April 15th 10 09:40 AM
Filter under and above certain criteria Geo Excel Discussion (Misc queries) 2 October 24th 07 05:29 PM
Filter criteria Tony Excel Discussion (Misc queries) 2 November 24th 05 10:40 AM
Filter Criteria Yaasien Excel Discussion (Misc queries) 3 May 26th 05 02:43 PM
"Criteria Range" in the "Data/Filter/Advanced Filter" to select Du TC Excel Worksheet Functions 1 May 12th 05 02:06 AM


All times are GMT +1. The time now is 12:45 AM.

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"