Have a look at this. I've removed a lot of unnecessary lines and combined other lines to remove the Select statements. This will optimize your code.
It fails on the theme color and the sorting, because I don't have them in a sample workbook. Try it with your workbook and if you run into any problems, then post your workbook you're running this on.