How to make macro independent of sketch no. and feature no. ?

I have recorded a macro which contains boss extrudes and cut extrudes. Whenever i am running it second time and so on, it fails because it dependent on the sketches and features used while recording. I want to make it independent and run it anytime anywhere in the tree.

Please help me out.

Thanks in advance!

SolidworksApi/macros