I'm trying to figure out how to adjust a macro that I use with the Auto-Filter tool so that I can have the auto-filter look for an adjustible variable (cell reference) rather than a fixed value imbedded in the macro. I simply recorded the below macro. Instead I want the macro to set the auto-filter value (field 26 in this case) to a value listed on a different sheet (i.e. the variables are my employee names). The sheet name with the employee list is called "Associate List" and I've also defined the range and called it "name_list" in case that helps. I'm not sure how to reference this within my macro - I've tried and failed lots of times today.
Note: My goal is to repeat this macro (copy and paste it) multiple times, but each new cycle will set the auto-filter in field 26 with the next variable on the Associate List sheet. There will be some additional code in between that I'll use to copy and paste the results into a new sheet but I've got that figured out. Thanks for any help!
Here's the full macro code that I have so far...It's the first part that I'm having trouble adjusting. FYI, the rest of the code simply copies the data to a new sheet (work in progress).
Bookmarks