From: Ian / ArtistGuitars.com.au Ian / on
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
..


From: Francis on
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
> .
>
>
From: Gary Keramidas on
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 /
ArtistGuitars.com.au(a)discussions.microsoft.com> wrote in message
news:06FB89C9-F10D-4F5F-84F8-3E5419B5BA12(a)microsoft.com...
> 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
> .
>
>

From: Dave Peterson on
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