do i just need to add this at the begining of my existing code removing the select ppe row and the next w at the end
Yes.

Here is a link on this concept.

Macro to Loop Through All Worksheets in a Workbook