Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #2 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
What module is this code in? If it is in the module for Sheet1 there is nothing here that could possibly affect Sheet2.
If instead it is in a general module (like Module1) then it will operate on whatever the active sheet is. You want this code to be in the Sheet1 module.
Alternatively, if in a general module, you can explicitly qualify the references for Sheet1. Note the With clause and that I have added dots in front of all references to Cells and Range.
Bookmarks