Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Macro to filter out lines

Hi I have written some macros and im having a problem excludinjg certain
lines in my worksheet.

I use the filter option. But I want to be able to filter out lines that
have"*" in them using a macro.

How do I change the filter to "not equal" ?

Ian / Artistguitars.com.au
..


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 120
Default Macro to filter out lines

Pls post your codes in order for us to ascertain the required changes.
--
Hope this help

Please click the Yes button below if this post have helped answer your needs

Thank You

cheers, francis





"Ian / ArtistGuitars.com.au" wrote:

Hi I have written some macros and im having a problem excludinjg certain
lines in my worksheet.

I use the filter option. But I want to be able to filter out lines that
have"*" in them using a macro.

How do I change the filter to "not equal" ?

Ian / Artistguitars.com.au
.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 72
Default Macro to filter out lines

it's hard to say what you want.

..AutoFilter field:=1, Criteria1:="<", Operator:=xlAnd

but i suggest you do a replace of the asterisk because it's a valid
wildcard. i used the ! here.

ActiveSheet.Range("$A$5:$K$228").AutoFilter Field:=5, Criteria1:= _
"<*" & "!" & "*", Operator:=xlAnd
this would filter all records that do not have an !.
--


Gary Keramidas
Excel 2003


"Ian / ArtistGuitars.com.au" <Ian /
wrote in message
...
Hi I have written some macros and im having a problem excludinjg certain
lines in my worksheet.

I use the filter option. But I want to be able to filter out lines that
have"*" in them using a macro.

How do I change the filter to "not equal" ?

Ian / Artistguitars.com.au
.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Macro to filter out lines

Either use:
Equals (or does not equal):
~*
(for an exact match of the asterisk)

Or use:
Contains (or does not contain):
~*

The tilde tells excel to treat the asterisk as an asterisk--not a wild card.

Same thing with the single character ? (use ~?) and tilde ~ (use ~~).

And Edit|Find uses the same technique, too.

========


Ian / ArtistGuitars.com.au wrote:

Hi I have written some macros and im having a problem excludinjg certain
lines in my worksheet.

I use the filter option. But I want to be able to filter out lines that
have"*" in them using a macro.

How do I change the filter to "not equal" ?

Ian / Artistguitars.com.au
.


--

Dave Peterson
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
Auto filter on blank lines Allana McDonald[_2_] Excel Discussion (Misc queries) 0 January 28th 10 05:01 PM
Auto filter on blank lines Allana McDonald Excel Discussion (Misc queries) 1 January 28th 10 04:20 PM
How do I filter out lines in a range? Aaron Excel Discussion (Misc queries) 9 April 21st 06 02:32 PM
how i do to make a self filter in more than 3000 lines? V. Ivanov Excel Worksheet Functions 1 January 19th 06 02:06 PM
Counting lines when using a filter hagan Excel Discussion (Misc queries) 8 July 5th 05 08:54 PM


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