View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Keith R Keith R is offline
external usenet poster
 
Posts: 55
Default duplicate named ranges- how to detect, delete?

XL2003

I had an old workbook which I used as a template for new data; I dumped the
old data and pasted in new, changed the workbook name, added and deleted
worksheets, etc. I had named ranges in there, and didn't mess with them
because I didn't need them at the time.

One sheet that I didn't keep was a sheet that had a bunch of graphs (for
reference, the data sources for those graphs are set to the named ranges). I
finally needed the graphs, so I opened an old copy of the workbook and used
the worksheet move/copy option to add a copy of the graphs worksheet to the
newer workbook.

I then checked the named range from the page with the graphs on it, and it
pointed to data in the new workbook- but the graph kept giving me errors
even though the data source reference to the named range was fine (it
wouldn't graph the range, and when I put the cursor in the graph data source
reference and tried to exit, it didn't like the reference).

Eventually, I figured out that when I accessed the named range from the
newer graphs worksheet, it pointed to the correct data in the newer
workbook. But if I selected/checked the same named range from one of the
other sheets in the newer workbook, that /same/ named range gives me a
different reference (back to the old data workbook).

I conclude that when I copied/pasted in the worksheet with graphs, it must
have copied in a duplicate copy of all of the named ranges, and the graph
balked because it didn't know which one to use.

So my question- is there a way to automatically prevent duplicate named
ranges from occurring, to detect when they do occur, and if they do occur,
to easily figure out how to remove the duplicates? Also, is the fact that
this can occur in the first place a bug?

Thanks,
Keith