@ ARGK

Just a reminder that code should be enclosed in code tags so that formatting makes it easier to read. You have two Next r statements with only one For r. That would probably have been spotted with indentation in place, as well as the fact that your End If is out of position.