Hi,
what exactly do you want your macro to do? I don't know where it fails, but I have some points to add:
1. You don't need to select a cell to copy it or assign its value to a variable. Selecting slows the macro down a lot. Instead of
you could use this:
2. You declared your variables as string (text). Be aware that the cell contents you assign them to will be also in text format!
3. This line kind of confuses me:
What exactly do you want to select? The code for selecting the cell right to the activecell is simply
4. If you want to know where your macro fails, you can go and exectue it step by step. Just press F8 while the code window is active and it will jump line by line. You can always check what happens after each step. Also, using messageboxes is useful as well. Try inserting lines like
to see what value is assigned to a variable. Maybe it's not what you would expect.
Also, please use code tags on the forum for better readability. Hope I helped a little. Cheers!
Bookmarks