I have this excel sheet created with the help of formulas and VBA codes. After I run the 5 macro buttons, the result is exactly as needed . But When I run one macro, I get an error message Run time error 1004, as in the image. I just press end and run the next macro. Finally the ultimate result is perfect. Now the problem is, In my next step, if I try to protect and hide the unwanted sheets the macro unprotects the sheet and shows the same error. So from there I am not able to continue as expected. I tried combining all the macros to one, but after combining the codes to one button I am still getting the same error.