Hi Naveen,
Your Quest: How can I define the range in autofilter if the criteria are at different cells. eg criteria 1 is at cell A1 and the next is at say B4?
Ans: what I designed last time is Filter by Advance filter, it is limiation of advance filter to identify the Criteria range in consequecial, so you can not do like that. but you problem can be solve with this new one I attached here.
Your Quest: In my data there's a criteria which is based on person's name. With your code Iam able to pull the details only if the criteria is matching the first name. eg if the name is James Anderson, and if I enter 'James' in criteria, the result is fine, but if I enter 'Anderson', it doesn't pull James Anderson, but it is pulling the other names which start with Anderson.
But if enter the name like *anderson* it pulls all the data, which is fine. Is there a way where I can get all the related data without entering the criteria using asteriks(*)?
Ans: I got the point, then I use autofilter now, and reference your criteria (Name) with 1 variable in the code, then attach the asteriks infront and behind with "*" & SelNm & "*" . You can do the same thing with 2 other criterias, just modify it, I know you can do.
Attachment ---->
FilterBySelectionAutoFilter2.zip
Hope it help...
Pichart Y.