• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Filter on Multiple criteria

Veeru106

Member
Hi,


Can any one please help me with the code to select multiple filter on single col. And paste in Final sheet


Sample sheet attached



Thanks
 

Attachments

  • Book1.xlsx
    17.7 KB · Views: 3
I was working on another file with same function..until i come up with this but it is giving me error " In valid field name" for the last line in the code.

r.AdvancedFilter xlFilterCopy, b, c

Can any one please tell me what is the issue here.

Thanks
 

Attachments

  • Veeru.xlsm
    25 KB · Views: 1

Hi,

just check variables r, b & c are Range and not equal to Nothing
like you can see in VBA inner help …
 
I m sorry ..i didnt get you...apologies for that as i am not that well versed with VBA..can you make correction in code in attached sheet and paste it here agian.

Thank you
 
As it's just about reading (and at child level …),
according to AdvancedFilter VBA inner help (a must read !),
what ranges from which worksheet should be r, b & c ?
(The same when you operate manually an advanced filter.)
As often variables are not needed, just ranges …

Operate manually and once expected result is reached,
activate the Macro Recorder and redo the same :
you will get your own free base of code !
In case of a need for an optimization,
post the generated code here using the appropriate code icon
with a crystal clear & complete explanation of your need …
 
Back
Top