You have many things inside the For each loop that should be outside the loop
With this code:
you copy all cells and that is a bit much.
Summarizing: The code looks like a recorded macro, adjusted to make it work. This is a bit strange to me as you have been around for a while on this forum?
If you would like us to make this into a proper VBA script please specify what you need:
1) From each source sheet copy content to new WB in a new Sheet (name should be date?)
Why do you need to hide/unhide (remove) subtotal
Maybe it is best to split your code in compact modules that do just 1 thing instead of many things.
Bookmarks