I suggest you attach your actual Excel file instead of a Word file with code pasted in. That allows us to test any changes we might propose.
If you want to show only your code, you can just paste it directly into your post (with CODE tags) rather than attaching a file with the code.
Can you please explain what you want this entire Sub to do? I am having a hard time reverse engineering it.
I will say that if you want to apply your changes to E to BA rather than just column E the fix is a simple one but the code needs other work as well. You do not need to Select a Range to operate on it, and it is almost always preferable not to do so. It appears that you started out by using the Macro Recorder which does not generate efficient code.
You are unprotecting all sheets, then re-protecting all sheets, but you never do anything else on all sheets. Your operation on column E will apply only to the currently active sheet. Do you mean for this to be one big loop?
You are declaring your variables but I also recommend you use Option Explicit.
Bookmarks