Excel the name already exists when Copy sheet

Why the Excel range name conflict dialog box appears, and how to avoid looping

When you're copying worksheets containing range names, Excel can detect conflicts and take you into a seemingly endless loop of Yes/No dialog boxes. This blog explains why this happens, and how to get out of the loop!

Posted by Andy Brown on 14 June 2019

You need a minimum screen resolution of about 700 pixels width to see our blogs. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.

This blog is aimed at those who are familiar with this sequence of dialog boxes when you are copying worksheets.  First this one:

Excel the name already exists when Copy sheet

Initially the dialog box asks you whether you want to create a new range name.

Then this one:

Excel the name already exists when Copy sheet

If you choose No, you get the chance to create a new range name.

Reproducing the problem

It's actually quite hard to reproduce this problem!  One way is shown here.  First download and unzip this workbook:

Excel the name already exists when Copy sheet

The workbook contains two worksheets called Inputs and Calcs.

If you press Ctrl + F3, you'll see that the workbook contains three range names:

Excel the name already exists when Copy sheet

Two range names point to the Inputs worksheet, and one points to the Calcs worksheet.

Save this workbook with a different name (say Revised.xlsx), and with both files open return to the Original.xlsx workbook and select both its workbooks to copy them:

Excel the name already exists when Copy sheet

Make sure you have both worksheets selected, then right-click to copy them.

Choose to copy both sheets to the Revised workbook, creating a copy:

Excel the name already exists when Copy sheet

Choose the options shown here to copy the two worksheets (and crucially, their range names) from one workbook to the other.

Bingo!

Excel the name already exists when Copy sheet

The loop begins ...

What's happening 

The reason you get the problem is that Excel is trying to resolve a conflict between two range names.  For example between:

  • the range name called Revenue in the Original workbook; and
  • the range name called Revenue in the Revised workbook. 

Here are the possible answers to the question posed:

Answer What it means
Yes All copied formulae will point to the version of the Revenue range name as defined on the target workbook.
No Excel will ask you to create a new range name, and will then create this new range name to replace the original Revenue one and redirect all copied formulae to point to it.

It's worth noting that Excel is normally more intelligent than this.  If you copy the worksheets individually rather than together, Excel will create local (worksheet-scoped) versions of the range name on the target workbook to avoid any conflicts, and you won't get this loop.

Two ways to remove the dialog boxes

After a fair amount of searching on t'Internet, I believe there are only two ways to get rid of these dialog boxes:

Method Notes
Complete them Answer the dialog box for each question which appears.  The quickest way to do this is just to keep pressing Yes, and the quickest way to do this is to put a weight on your Enter key and go off to make a coffee (I'm indebted to Dave from my course yesterday for this tip ...).
Abandon Excel Press Shift + Ctrl + Esc (quicker than Alt + Ctrl + Del) and choose to close Excel, losing any work that you haven't saved).

I realise neither answer is particularly satisfactory, and would love to hear from anyone who has a better one!

If you're using range names, you're probably already proficient at Excel.  Did you know that we offer live online advanced Excel courses, as well as VBA courses?  You can see a summary of all of our classroom and online Excel training courses on this site.

This blog has 0 threads Add post

How do you stop Excel from saying name already exists?

Replies (6) .
Press Ctrl+Alt+Del to shut down Excel..
Open Excel and then open the workbook..
Press Ctrl+F3 and filter the named ranges on errors..
Delete all erroneous named ranges..
Click on OK..
Save the workbook..

How do you identify a text already existing in the spreadsheet?

Press Ctrl+F or go to Home > Find & Select > Find. In Find what: type the text or numbers you want to find. Select Find All to run your search for all occurrences. Note: The dialog box expands to show a list of all the cells that contain the search term, and the total number of cells in which it appears.

Can two sheet have the same name in Excel?

When you create a named range, Excel assumes that you want the name to be available from every worksheet within a workbook. You can, however, specify that a name be valid only for the current worksheet. In this way you can define the same name on different worksheets in your workbook.

What is name conflict in Excel?

If you are seeing the Name Conflict dialog box in Excel, that's because you are trying to copy one or more worksheets to a workbook that has similar named ranges.