Application- or object-defined error
If you got the following warning from Excel, this

The problem is often caused by two or several named ranges that has the same name. This is often the result of some kind of copying between different models.
Try to follow the steps below to fix the problem:
- In Excel, open the Formulas-tab and go to “Name Manager”.

- Sort the names by the “Refers To” –column, by clicking on the bar.
- All the external references should now be on the top of the list or at least sequentially. External references contain a reference to another file, such as [Second_workbook.xls]

- Select all names containing external references and click “Delete”.
- Re-run the macro that caused the error, and it should now be working.