Copy sheet preserving formulae, range names etc

I have a problem with creating an exact copy of a sheet that contains range names.

When using the Move / copy facility, Calc automatically name the new sheet ‘Name’-2, and in the Name Manager the range names all appear with ‘Name’-2 in parenthesis after the name.

Is there a way to get a one to one copy of a sheet that can be renamed after copying and still have the original range names showing in the active cell windows in the upper left corner in the box with the cell reference even after renaming the new sheet?

in the Name Manager the range names all appear with ‘Name’-2 in parenthesis after the name

I doubt that. But what happens is that a copied named range keeps its name but the Scope changes from Document (Global) to the new sheet’s name like Sheet1_2 and the range it points to is adapted from, for example, $Sheet1.$A$1:$A$2 to $Sheet1_2.$A$1:$A$2, so formulas copied along with the sheet using that name pointing to copied data continue to work on the new sheet’s data instead of the old sheet’s data. Unless you are using a very old LibreOffice version that could not do that, you didn’t mention the version.

Thanks. You are right.

I do not understand why the range names do not appear in the name box when the active cell is one with a defined name. Whether this has any actual effect on the fiunctionalty in formulas remains to be seen.

But maybe you can answer another question related to named data ranges.

Is it possibke to combine a text string (such as a month name) and a data range name to make a working cell reference that can be used in an INDIRECT formula.

I have to correct myself, with Name Manager I thought you meant the Manage Names dialog where there are no names with parentheses, but in the Name Box they are listed such to give a hint that they have sheet-local scope.

hello @Haagen,

[i deleted my first answer as @erAck’s comment opened more capa]
[‘delete’ an answer in ‘ask’ is funny, you are offered a ‘edit’ box, and after saving that edit it’s gone … ]

the question remians me about a jewish joke / wisdom: for a celebrity every jewish woman is supposed to light two candles, a poor woman asks the rabbi if it is enough if she stands in front of a mirror with one candle … Answer: ‘no, it would be two candles … but also two Jewish women’,

calc has at least four sorts of ranges, ‘defined database ranges’ [data - define range], named ranges (global), named ranges ‘per sheet’ (property ‘scope’ in ‘manage names’, ctrl-F3) and automatically created “anonymous_db’s”, they are all somewhat different,

it is! possible to have multiple named ranges with identical names but different scopes, and a ‘defined range’ with identical name to a ‘named range’, and it becomes difficult to decide which of them is referenced in a formula (if found on sheet then that, else global), and it is! one of the entrances to the hell of confusion,

as it’s ambigous to have identical names with identical scope (global) for different areas, calc ‘shrinks’ the scope to ‘sheet’ when copying a sheet, and formulas will use that reference as it has precedence over global definitions,

thus calc manages a survive of referencing by ‘named ranges’ over the copying of sheets …

leftover from the question is why the names of ranges don’t automatically appear in the ‘name box’ anymore, that even happens if you manually change the scope of a range from global to sheet, it looks as if names with ‘sheet scope’ are excluded from that … enhancement request?

hidden anonymous DB areas - "__Anonymous_Sheet_DB__0" - of which one per sheet is created by calc in the background when needed, are handled by creating e.g. "__Anonymous_Sheet_DB__1" on the new sheet, they also survive,

no survival concept exists - afaik - for areas defined by [data - define range], they are omitted when copying sheets, thus e.g. filters defined for them are shown but do not work in the copied sheet, and are gone after save-load - enhancement request?

thus it’s possible to make nearly! identical copies, calc handeles it to a very far extent,

[/edit]

reg.

b.

why the names of ranges don’t automatically appear in the ‘name box’ anymore

Sheet-local names aren’t displayed there, I think a RFE exists in the bug tracker.

@erAck: found that: 67007 - click to open - quite old bug but low prio …

Thanks, I’m fixing that.