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.
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.
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 …