Name manager duplicates entries - but corrupts the duplicates

sgcannon

Board Regular
Joined
Jan 28, 2016
Messages
56
A couple of times I've been working with name manager and inexplicably, it duplicates all my entries. One of each pair (I don't know whether it is the original or the duplicate) is corrupted. It seems to happen when I have two different versions of the same file open. I had hoped to post a couple of screen shots of what I'm talking about but I can't figure out how to upload images on Mr. Excel.

Is it a no-no to open name manager when two files are open?

Thanks,

Steve
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Hi Steve, There isn't any reason not to open name manager when you have more than one file open.

In the name manager, do your duplicate have the same scope and workbook/worksheet references? It's not unusual to have the name duplicated with each listing referencing a different workbook or worksheet.
It would be unusual for duplicate name listings that have the same scope and workbook/worksheet references.

There isn't a post image files on this site. When needed, you can post to an image hosting site then provide a link. In this case, if you provide a few examples of the text appearing in the Name Manager for those duplicates (including Name, Refers to:, Scope), that should provide the information needed to help you.
 
Upvote 0
Thanks for your willingness to help.

For example (I can't get the columns to stay organized when I submit the post so I just added ....)

Name...... Value..... Refers to.... Scope
Col_First..... 29...... ='Col Def'!$b$6.... Col Def
Col_First..... #Ref!...... =#Ref!#Ref!.... Workbook
Cstrk..... (...)...... ='C:\users\steve... .........Col Def (Refers to another version of the workbook)
Cstrk.... 50%....... =Master!$dp$3.... Workbook



Thanks!



Hi Steve, There isn't any reason not to open name manager when you have more than one file open.

In the name manager, do your duplicate have the same scope and workbook/worksheet references? It's not unusual to have the name duplicated with each listing referencing a different workbook or worksheet.
It would be unusual for duplicate name listings that have the same scope and workbook/worksheet references.

There isn't a post image files on this site. When needed, you can post to an image hosting site then provide a link. In this case, if you provide a few examples of the text appearing in the Name Manager for those duplicates (including Name, Refers to:, Scope), that should provide the information needed to help you.
 
Last edited:
Upvote 0
None of those names represents an unusual duplicate.

For Col_First, in one case this has scope on Sheet "Col Def", in the other case, the name has workbook scope. The #REF! value isn't corruption per se- it's likely that the worksheet that was originally referenced by the name was deleted.

The Cstrk names have scope in two different workbooks, so there's nothing wrong or unusual with that.

When you copy a worksheet that has a named range with workbook scope, Excel will automatically create a new Name with worksheet scope on the new worksheet. You can copy the worksheet 10 times and end up with 11 Names that have the same name but different scope.
 
Last edited:
Upvote 0
I think I understand what you're saying. And yes, someone else worked on Col Def which has named ranges in it. Then I deleted my Col Def and copied his version over (maybe not in that order). So that's why I have two sets of each named range, correct?

In the future, should I delete all his named ranges before copying his worksheet over so that I don't get the duplicates?

Thanks, you've been a ton of help!!!

Steved



None of those names represents an unusual duplicate.

For Col_First, in one case this has scope on Sheet "Col Def", in the other case, the name has workbook scope. The #REF! value isn't corruption per se- it's likely that the worksheet that was originally referenced by the name was deleted.

The Cstrk names have scope in two different workbooks, so there's nothing wrong or unusual with that.

When you copy a worksheet that has a named range with workbook scope, Excel will automatically create a new Name with worksheet scope on the new worksheet. You can copy the worksheet 10 times and end up with 11 Names that have the same name but different scope.
 
Upvote 0
READ THIS ONE INSTEAD

I think I understand what you're saying. And yes, someone else worked on Col Def which has named ranges in it. Then I deleted my Col Def and copied his version over (maybe not in that order). So that's why I have two sets of each named range, correct?

In the future when I want to copy someone else's version of a worksheet that has named ranges, how is the best way to do that? I am thinking that I should delete all the names in my workbook that refer to Col Def. Then delete Col Def. Then copy his version of Col Def over to my workbook? Except maybe the name ranges will refer to his version of the workbook and so the links will be screwed up?

Now that I understand what is going on, I can manually correct the problems, just wondering if there is an easier way.

Thanks, you've been a ton of help!!!

Steved
 
Upvote 0
I think I understand what you're saying. And yes, someone else worked on Col Def which has named ranges in it. Then I deleted my Col Def and copied his version over (maybe not in that order). So that's why I have two sets of each named range, correct?

Yes, the second set of names was created when you copied the worksheet (which would have had to have been before you deleted it.) ;)

In the future when I want to copy someone else's version of a worksheet that has named ranges, how is the best way to do that? I am thinking that I should delete all the names in my workbook that refer to Col Def. Then delete Col Def. Then copy his version of Col Def over to my workbook? Except maybe the name ranges will refer to his version of the workbook and so the links will be screwed up?

Now that I understand what is going on, I can manually correct the problems, just wondering if there is an easier way.

If you really want to keep the Name Manager clean, then you need to delete any names that are scoped to or reference a deleted worksheet. That's probably easier to do after deleting the worksheet, because the values will show up as #REF!.

If you limit your cleanup to those names that reference a deleted sheet in the same workbook, that wouldn't affect some else's names that reference a different workbook.

FWIW, I typically don't pay that much attention to inadvertently created names in my workbooks. Occasionally, I'll review the name manager and delete unneeded names- but for the most part, they are harmless so I don't clean them up unless I'm handing over a file for someone else's use.
 
Last edited:
Upvote 0
At least you've cleared up a mystery for me. I know where it is coming from now and how to fix it.

Would you mind helping me with one other similar matter? I use a lot of conditional formatting. Periodically I'll go into conditional formatting and find that what was once a block of cells with one conditional formatting range is now listed using ten ranges. Presumably this is because I've inserted cells or something similar. Of course it bugs me and I go in and redo the range. Is there a quick way insert cells and have the conditional formatting range stay the same, that is, having one range with the same beginning and end points but now including all the inserted cells?

Thanks for your help!





Yes, the second set of names was created when you copied the worksheet (which would have had to have been before you deleted it.) ;)



If you really want to keep the Name Manager clean, then you need to delete any names that are scoped to or reference a deleted worksheet. That's probably easier to do after deleting the worksheet, because the values will show up as #REF!.

If you limit your cleanup to those names that reference a deleted sheet in the same workbook, that wouldn't affect some else's names that reference a different workbook.

FWIW, I typically don't pay that much attention to inadvertently created names in my workbooks. Occasionally, I'll review the name manager and delete unneeded names- but for the most part, they are harmless so I don't clean them up unless I'm handing over a file for someone else's use.
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,603
Members
449,038
Latest member
Arbind kumar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top