Excel VBA name already exists on destination sheet

I am trying to copy from one workbook to another but get a message as I move the sheet that a name already exists. is there a way to automatically ignore this message?

The message is:

Excel VBA name already exists on destination sheet
is:

the code for the copy

CurrentWorkBook.Sheets(Array("Compliance - learning")).Copy Before:=ActiveWorkbook.Sheets(1)

asked Oct 19, 2016 at 14:46

I think you are looking for

Application.DisplayAlerts = False
    CurrentWorkBook.Sheets(Array("Compliance - learning")).Copy Before:=ActiveWorkbook.Sheets(1)
Application.DisplayAlerts = True

answered Oct 19, 2016 at 14:48

Excel VBA name already exists on destination sheet

3

Excel for Microsoft 365 Excel 2021 Excel 2019 Excel 2016 Excel 2013 Excel 2010 Excel 2007 Excel Starter 2010 More...Less

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.

Suppose the worksheet that you're trying to copy and the destination workbook where you want to copy the worksheet into both have a named range called InterestRates. When you try to move or copy the worksheet, Excel will detect this conflict and display the following message:

The name 'InterestRates' already exists. Click Yes to use that version of the name, or click No to rename the version of 'InterestRates' you're moving or copying.

Note: The Name Conflict dialog box will appear for every instance of a conflicting name range. If you are using a subscription version of Excel then the conflict dialog message includes a third option labeled Yes to All which means you won't see the message appear for additional conflicting name ranges.

Resolution

When you see the above dialog box, you must do one of the following:

  • Click Yes to continue using the conflicting range name in the destination workbook.

    What happens when you click Yes?

    Excel will copy the conflicting name range to the destination workbook. That means you will have two similarly named ranges in your destination workbook.

    Warning: If there are formulas that refer to conflicting named ranges in your workbook, then copying those ranges will affect those formulas and cause errors in the workbook. If you are not familiar with the data in the destination workbook, do not click Yes. Instead click No to rename the conflicting range.

  • Click Yes to All to continue using all possible conflicting range names in the destination workbook. Note that you only see this option if you're using a subscription version of Excel.

    What happens when you click Yes to All?

    Excel will copy all conflicting name ranges to the destination workbook. That means you will have two or more similarly named ranges in your destination workbook.

    Warning: If there are formulas that refer to conflicting named ranges in your workbook, then copying those ranges will affect those formulas and cause errors in the workbook. If you are not familiar with the data in the destination workbook, do not click Yes to All. Instead click No to rename the conflicting ranges one by one.

  • Click No to rename the conflicting name range. This displays the following dialog box.

    Excel VBA name already exists on destination sheet
    1. In the New name section, enter a new name for the range. The new name will not be accepted if it

      • starts with a letter or underscore,

      • is a cell reference, such as A1, A123, or XFD21,

      • has spaces or characters (\, /, *, [, ], :, ?), or

      • has the same name as another range in the workbook that you are copying to.

    2. Click OK.

Need more help?

You can always ask an expert in the Excel Tech Community or get support in the Answers community.

Need more help?

Why does Excel say name already exists?

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.

When copy sheet name already exists?

Re: Error when copying or moving a sheet, name already exist Click "No" give your sheet a different name, go back to the conflicting sheet, delete or rename it, and then rename the sheet you were trying to copy.

Can you rename a sheet by left clicking the current sheet name once?

Rename Sheets with a Simple Double Click Place your cursor over the sheet tab that you want to rename. Double-click on it. This will put the sheet name in the edit mode. Enter the name of the sheet that you want.

Why can't I change the name of a sheet in Excel?

Is the rename option greyed out or does the user get any error message? However you can rename the sheet tabs when the worksheet is protected. If you have used the protect workbook (protect workbook for structure) option then you will not be able to rename sheet tabs.