I have a user who works on a lot of Excel files with the same format (the actual content is different, but the columns and format is the same). He created a macro in one of them, and when running it in another spreadsheet it gives a runtime error. It says, run time error 9 subscript out of range. When I click debug it shows the file name of the excel file where the macro was created and not the current excel file. How can I change that to work in any excel file? Below is one line in question. I will attach the full macro module.