1. THERE'S NO NEED TO SHOUT IN YOUR TITLE

2. Please use CODE tags to format your macros. The [#] icon inserts them and paste the code between them. I fixed your macro this time

3. It's hard to test your macro without some input data that causes the error and the expected result. Please add this missing information