<NOOB ALERT - GO EASY ON ME>
I am trying to create a macro that applies an Autofilter. The filter should select a field based on cell contents in a different worksheet.
From what I can tell, Autofilter Fields can only be specified as numbers indicating the column number of that field (e.g. "AutoFilter Field:=2"). I want to do something a bit different... My code needs to reference a cell on a different worksheet, and that cell should tell the autofilter which field to filter on.
In the attached workbook, there are two tabs. The "DATA" tab contains the data that requires filtering. The "INPUT" tab is where the user will specify how the filter should be applied. On the INPUT tab you can see that I have a drop-down list in cell C5 which allows the user to select a weekday (in this case "Monday"). This needs to tell the Autofilter to filter on the "Monday" field of the DATA tab and select any record with a "1" in that field. If I select "Tuesday" on the INPUT tab, I want the code to filter on the "Tuesday" field of the DATA tab and select any record with a "1" in that field. The same would apply for any other weekday in the drop-down list.
Thanks in advance.