Hi - I'm not sure what criteria you're referring to, but one solution is to use the Macro Recorder. This will copy everything that you do, and will produce code for you so that you can make your own Add-In in fact. It's designed to help users automate their repetitive tasks. Depending on the criteria, sorting tasks should be straight-forward for the Macro Recorder.