Why Excel Keeps Saying "The Name Already Exists" When You Copy a Sheet
You right-click a sheet, choose Move or Copy, pick another workbook, and Excel interrupts:
"A formula or sheet you want to move or copy contains the name '__1__123Graph_ACHART_12', which already exists on the destination worksheet. Do you want to use this version of the name? To use the name as defined in the destination sheet, click Yes. To rename the range referred to in the formula or worksheet, click No, and enter a new name in the Name Conflict dialog box."
You click Yes, and the same message comes back with a different name. Then again, sometimes dozens or hundreds of times, for names you've never seen. Here's what those names are, why Excel asks about each one, and how to get rid of them for good.
The names behind the message
Excel lets you give a cell, a range or a formula a defined name, such as TaxRate for Inputs!$B$2, and then use =Price*TaxRate instead of cell addresses. Each name lives in a list inside the workbook. It is scoped either to the whole workbook or to one sheet.
When you copy a sheet into another workbook, Excel brings along the names that sheet depends on, so its formulas keep working. If the destination already has a name with the same spelling, Excel can't keep both, so it asks you which definition wins, once per name. That question is the message above.
Why there are so many you never created
A workbook that has been in use for a few years usually holds far more names than anyone made on purpose:
- Names that point at nothing. Delete a sheet, and every name that referred to it becomes
#REF!. Excel doesn't remove them. They stay in the list and travel with every copy. - Hidden names. Add-ins, financial data plug-ins and older file conversions create names marked hidden. The
__123Graph_…names in the message above are leftovers from Lotus 1-2-3 charts, for instance. Hidden names don't appear in Name Manager at all, which is why the message seems to come from nowhere. - Names that point at other workbooks. Copying a sheet from
Q1.xlsxintoQ2.xlsxcan leave names that refer to[Q1.xlsx], or to a file on a drive that no longer exists. These also cause the "This workbook contains links to external sources" prompt. - Copies of copies. Each time a sheet is copied between two cluttered workbooks, both workbooks' leftovers merge. Deleting the copied sheet afterwards doesn't remove the names it brought. Over years, one template can collect thousands.
None of these show up as a problem until you copy a sheet. Then every one of them that exists in both files turns into a separate question.
Yes or No?
For a one-off copy, Yes is usually right: the copied sheet uses the destination's definition of the name. Newer versions of Excel also offer a "Yes to All" button, which does that for every remaining name. Be aware of what Yes means, though. If the two workbooks define the same name differently (Revenue is A1 in one file and B2 in the other), the copied formulas now calculate from the destination's cells, without any warning. No lets you type a new name for the copied version instead, which keeps both definitions apart but is impractical for more than a handful.
Either way, clicking through only gets you past this copy. The names are still there, and the next copy asks again. The fix is to remove the junk names.
Getting rid of them
- Delete the broken ones in Name Manager. Press
Ctrl+F3, open Filter, choose Names with Errors, select everything, then click Delete. They point at#REF!, so no working formula depends on them. This alone often removes most of the prompts. - Make hidden names visible, then review them. Name Manager can't show hidden names, so the usual way is a short macro (Alt+F11, Insert → Module, run it):
After that they appear in Name Manager, where you can delete the ones you recognise as leftovers.Sub UnhideAllNames() Dim n As Name For Each n In ActiveWorkbook.Names n.Visible = True Next n End Sub - Check names that refer to other files. In Name Manager, sort by Refers To and look for
[or a file path. Delete them if you don't need those links. Any formula that used one will show#NAME?, which tells you exactly where it was used.
Many company computers block macros, Excel for the web doesn't run VBA, and workbooks with tens of thousands of names can make Name Manager too slow to open. For those cases, the Excel name conflict fixer reads the name list straight from the .xlsx file in your browser. It shows every name, hidden ones included, flags the broken, hidden and other-workbook ones, and removes the categories you choose without touching anything else in the file. If you add both workbooks, it also lists exactly which names exist in both, so you can see in advance which prompts a copy would trigger.
Avoiding it next time
- If you only need the numbers, copy the cells and use Paste Special → Values into a new sheet instead of copying the whole sheet. No formulas means no names come along.
- Clean the source workbook (broken and hidden names) before you use it as a template that gets copied around.
- Keep names you create at workbook scope with distinct, specific names (
Q3_TaxRate, notRate), so they don't collide with someone else'sRate.
Spreadsheet files cause other quiet surprises too. If long numbers in a CSV come back rounded or in scientific notation, see why Excel mangles your CSV numbers.