Advanced Filter VBA

Genzz

New Member
Joined
Jun 17, 2005
Messages
22
Hi All
I to need filter in more than 2 conditions in same column, I tried advanced filter I didn't get anywhere mainly because my conditions are:
Non Blank
Does Not Begin With
Does Not End With
Does Not Contain
I don't how to make these conditions in advanced filter at the same time.


I tried recording a macro and editing but no joy. I am using the following code.

Code:
Sub Filter3()

    Range("A8").Select
    Selection.AutoFilter
    Selection.AutoFilter Field:=29, Criteria1:="<>", Criteria2:="<>^*", _
    Criteria3:="<>*^", Criteria4:="<>*^^*"
    Range("A8").Select

End Sub

Any suggestions please?

Many Thanks
Genzz
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Hi
Thanks for the reply.
Yes I have read Brians tips and the advanced filter work the criteria is equal to certain values. But is doesent work when I try the follwing criteria.

<> (Non Blank)
"<>A*" (Does Not Begin with "A")
"<>*A" (Does Not End with "A")
"<>*AA*" (Does Not Contain "AA")
I need to filter on those 4 conditions.
 
Upvote 0

Forum statistics

Threads
1,214,927
Messages
6,122,311
Members
449,080
Latest member
jmsotelo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top