Please open the attached example and follow along:
I would like a Macro that sorts data based on the following:
If someone selects AMF under "select organization" I would like only the names with 1 as the "org code" (see Data1 and Data2 worksheets) to report. If someone selects BO only "org code" 2, BPFTI "org code" 3, etc... (I can add the orgs. to the macro as needed once I have the syntax)
Further, if someone selects "Non-Compliant" I would like only the names with 0 as the "times completed" to report. If someone selects "Compliant" I would only like the names with 1 in the "times completed" to report.
Here is where its gets a little tricky... the real-data's worksheets are not called "data 1" and "data 2" the worksheet names change from the source database on each export. So the Macro has to run on ALL worksheets in the workbook.
HOWEVER, the field "times completed" is not always in column F, sometimes it is in column E.
I'm not sure what the best solution is give that little caveat... I'm open to having 2 macros, one that runs in the case that it is in column F and one that runs in the case that it is column E.
Lastly, I do no want to run the macro until both drop-down lists are selected. And I would also like to have the macro unhide "Data 1" and "Data 2" after it has completed running. I have left those worksheets visible for the purpose of this question.
Thanks in advance!