Hello godster84,
Welcome to the forum! Rows and Columns are are Long integer types and you should dimension them that way. Also, when a function, like Instr, requires a string variable, use the Text method the Range rather than the Value.
Macro with Changes
Please be considerate of other posters and the read the Forum rules for posting. You can do so by clicking Here.
How to wrap your Code
On the Message window Toolbar you will see the # icon. This will automatically wrap the text you selected with the proper HTML tags to create a Code Window in your post. You can do this manually by placing the tag [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] at the end.
Failure to follow these rules can result in your post being locked, or deleted. If your post is locked, it will be unlocked when you contact the moderator who locked it by Private Message (PM). You must agree to the rules before the moderator will unlock it.
The rules are designed to provide the best possible environment in which to share information. Posting, when done correctly, makes it easier for other members and guests to quickly find answers to questions, and gain insight into solving problems. Descriptive titles and using code tags are key to making posts easy to find and read.
Sincerely,
Leith Ross
Bookmarks