A good way to learn is to use the record Macro wizard built into Excel. Then modify it for the variables. If after using the record macro and you have issues, post your code with an explanation of your issues and we will assist. I would do the filter for the unique items on the already filtered data you have. Give it a try, and you will be surprised how much you can accomplish this way.