Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Colin Hayes
 
Posts: n/a
Default

In article , Bob Phillips
writes
Hi Colin,

When using more than 2 criteria on the same data, best to use the Advanced
Filter. See http://www.contextures.com/xladvfilter01.html for details, and
post back with a new thread if you get stuck.

Regards

Bob


HI Bob

OK I'll go and have a look there.

Thanks again.

Colin

"Colin Hayes" wrote in message
...
In article , Bob Phillips
writes
Colin,

here is an example that works for me

Columns("A:A").AutoFilter Field:=1, _
Criteria1:="=Bob", _
Operator:=xlOr, _
Criteria2:="=Lynne"



HI Bob

Yes , that works I find , but it's the next one that causes the problem.
Here's my code for selecting and deleting lines :

Cells.Select
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="=*is deleted*",
Operator:=xlOr, _
Criteria2:="=*changed on*"
Selection.Delete Shift:=xlUp

If I try to add another criteria (select and delete lines with the word
'added' in them) , I get code errors.

I don't know why adding

, Operator:=xlOr, _
Criteria3:="=*added*"

shouldn't work. There are ways around it I think , but all a little
cumbersome.

I do note that the user interface via the menu options does only allow
two entries , but I thought it could be implemented via VBA.




Best Wishes


Colin




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
opening text files that have more rows than 65536 rondajoy Excel Worksheet Functions 3 June 8th 05 03:41 PM
Autofitting a row Josephine Excel Discussion (Misc queries) 2 March 3rd 05 03:37 PM
delete empty rows between rows with text Paulo Baptista Excel Discussion (Misc queries) 2 February 28th 05 03:41 PM
copy / paste selective rows Kenny Kendrena via OfficeKB.com Excel Discussion (Misc queries) 5 February 7th 05 12:55 PM
how do I easily convert a single column of text (multiple rows si. philmah Excel Discussion (Misc queries) 2 December 16th 04 12:24 AM


All times are GMT +1. The time now is 05:47 PM.

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

About Us

"It's about Microsoft Excel"