You probably should be a bit more explicit with your range/cell references. Here, you didn't put the "." before the range reference on your two if statements. The With statement is ok, but I would explicitly point to the other worksheet as well:
Doing this means you won't have to actually select Sheet2. I would also recommend not using Sheets(2) and Sheets(4). Typically the tab names are static even if they get moved around, you could refer to them by name: Sheets("Sheet2") and Sheets("Sheet4") - of course changing to your actual names. An even safer approach would be to rename them in the VBA IDE's Properties (select View Properties, select each sheet and change the name in the Properties window). Doing that would allow the programmer (you) to control the sheets very tightly. Typically when I do this, I would name them in Hungarian notation, like wksSheet2. Then, in your code:
and so on.
Bookmarks