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

Here is a code:

Selection.AutoFilter Field:=18, Criteria1:=Sheets
("Code").Range("J2").Value

This code works fine; however, I need it to filter to
everything that does not equeal Sheets("Code").Range
("J2").Value not everything that equals it?

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

Selection.AutoFilter Field:=18, Criteria1:="<" & Sheets _
("Code").Range("J2").Value

--
Regards,
Tom Ogilvy

"scrabtree" wrote in message
...
Here is a code:

Selection.AutoFilter Field:=18, Criteria1:=Sheets
("Code").Range("J2").Value

This code works fine; however, I need it to filter to
everything that does not equeal Sheets("Code").Range
("J2").Value not everything that equals it?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default filter code help

Tom gave you the answer, but remember that you can turn on the macro recorder
before you set up the filter. It will give you the appropriate commands.

On Sun, 1 Aug 2004 13:54:49 -0700, "scrabtree"
wrote:

Here is a code:

Selection.AutoFilter Field:=18, Criteria1:=Sheets
("Code").Range("J2").Value

This code works fine; however, I need it to filter to
everything that does not equeal Sheets("Code").Range
("J2").Value not everything that equals it?


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
Code to replace Advanced Filter RobN[_2_] Excel Discussion (Misc queries) 4 June 14th 07 12:31 PM
Filter isn't working with a VBA Code [email protected] Excel Worksheet Functions 8 June 15th 06 01:20 PM
Filter Code Ray Kanner[_2_] Excel Programming 4 April 29th 04 02:53 PM
vba filter code Gabriel[_3_] Excel Programming 3 February 22nd 04 06:24 PM
Apply more than one filter in macro/vb code Stepnen Excel Programming 1 February 19th 04 07:49 PM


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