Application- or object-defined error

If you got the following warning from Excel, this 

 name manager3

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:

  1. In Excel, open the Formulas-tab and go to “Name Manager”.

    name manager1

  2. Sort the names by the “Refers To” –column, by clicking on the bar.

  3. 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]

    name manager2

  4. Select all names containing external references and click “Delete”.

  5. Re-run the macro that caused the error, and it should now be working.