Bug 35296 - Defining Name to multiple selection in Calc
Summary: Defining Name to multiple selection in Calc
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.3.1 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 158859 (view as bug list)
Depends on:
Blocks: Cell-Name
  Show dependency treegraph
 
Reported: 2011-03-14 07:21 UTC by sasha.libreoffice
Modified: 2024-01-09 09:08 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
screenshot of multiple cells (42.87 KB, image/jpeg)
2012-01-02 05:34 UTC, GerardF
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sasha.libreoffice 2011-03-14 07:21:05 UTC
to reproduce this problem in Calc select two non adjaicent cells (for example a1 and c1) and press Ctrl-F3. Appears dialog Define Names. It allows only one selection and not allows multiple selection.
But in Help of Calc written:

Name
Enter the name of the area for which you want to define a reference. All area names already defined in the spreadsheet are listed in the text field below. If you click a name on the list, the corresponding reference in the document will be shown with a blue frame. If multiple cell ranges belong to the same area name, they are displayed with different colored frames.
---end of citate---
In last sentence written that in should work with multiple selection. In manual for OpenOffice 2.0 allso writen that it should work. As I can understand, this function was temporarily removed while transition from OpenOffice 2.4 to 3.0 and was never returned.
In MS Excel 2003 this function forks for multiple selections. And when we open xls file with saved Named multiple selection, it losts.

produced on Mandriva 64 bit and windows XP 32 bit on LibreOffice 3.3.1.2 and 3.3.2.1rc1

do not cunfuse this function with Data->Define range. It is different.
Comment 1 Kohei Yoshida 2011-03-21 18:42:41 UTC
>If multiple cell ranges belong to the same area name, they are displayed with different colored frames.

This does not mean that a named range can support disjointed range.  It doesn't.

What it means is that when the named range, which can be a formula expression, contains multiple references, it should highlight all referenced ranges which can be more than 1.

E.g.

A1+A3+A6

is supported in named range, and it contains 3 disjoint references, but

A1;A3;A5 (or A1,A3,A5 depending on your locale)

is not a valid named range.

The help is not entirely wrong, but it needs to show some examples to clear any ambiguity.
Comment 2 Kohei Yoshida 2011-03-21 18:44:16 UTC
This is a documentation issue.
Comment 3 sasha.libreoffice 2011-03-22 03:25:11 UTC
Thanks for explanation
Comment 4 Björn Michaelsen 2011-12-23 11:45:20 UTC Comment hidden (obsolete)
Comment 5 sasha.libreoffice 2012-01-02 02:55:33 UTC
reproducible on LibO 3.5.0 beta 1
I transform this bugreport to feature request
Comment 6 GerardF 2012-01-02 05:34:30 UTC
Created attachment 55044 [details]
screenshot of multiple cells

(In reply to comment #1)

> 
> A1+A3+A6
> 
> is supported in named range, and it contains 3 disjoint references, but
> 
> A1;A3;A5 (or A1,A3,A5 depending on your locale)
> 
> is not a valid named range.

I disagree (in part) with this.
(A1;A3;A5) or A1~A3~A5 or (A1:A3;B5:B7) are valid named range.
They cannot be defined with mouse but entered manualy.

You can also use multiple cells range in formula (excepted array formula)
Comment 7 Joel Madero 2012-07-03 08:57:49 UTC
This is behaving as it's intended to be as it's already been explained. You can only do contiguous cells for naming ranges. I don't see a reason why you'd ever want to name non contiguous cells under one name. There is documentation issues which I will take care of to make it more clear. I'm going to mark this as NOTABUG. If there is a compelling reason why we'd want to allow naming non contiguous cells please post (as far as I read into what was posted, there was no why, just a comment that documentation isn't quite clear). Thanks for the post
Comment 8 Joel Madero 2012-07-03 09:12:12 UTC
Reading it again it actually isn't even bad documentation. It's just saying that if completely different cell ranges have the same name, they are different colors. If I'm not mistaken, that's exactly what your jpeg shows. If this isn't the case please upload an actual document that I can see what you mean. I've never used names before but on second glance I think it's working as intended and that documentation is fine.
Comment 9 sasha.libreoffice 2012-07-06 05:19:59 UTC
> If there is a compelling reason why we'd want to allow naming non
> contiguous cells please post
I can find only one reason: opening documents from msExcel.
But nobody complains about incorrect opening.
So, let we wait if somebody will complain about incorrect opening, and then will think what to do. May be it is so rare used functionality of msExcel, that nobody uses it.
Comment 10 j.keuseman 2013-03-23 20:12:37 UTC
This may be rarely used but I recently was trying to accomplish this for over an hour before I found this bug and determined it was not possible.  I would really appreciate it if this feature was supported.
Comment 11 rlk 2014-09-07 19:47:50 UTC
Here's an example of what I'd like it for:

I have a spreadsheet I use to record workout data.  Part of that data includes split times; a given workout may have multiple splits (my spreadsheet allows up to 9 split times/distances/pace per workout).

I'd prefer to group them as D1,T1,P1,D2,T2,P2... rather than D1,D2...T1,T2...P1,P2...  But I'd like to be able to easily perform operations on all distances and times easily.  Part of this involves plotting the results.  I'm aware that I can use a1:a100;d1:d100;g1:g100... in a chart, but it's easier to manipulate as a range.
Comment 12 Olivier Hallot 2018-05-10 15:01:04 UTC
Re-qualifying to a Calc enhancement issue, not Documentation
Comment 13 Stéphane Guillou (stragu) 2024-01-08 23:37:56 UTC
*** Bug 158859 has been marked as a duplicate of this bug. ***
Comment 14 gmolleda 2024-01-09 09:08:16 UTC
Select the ranges A2:A3 and C3:C4 
Write a name for it, the error is: "The selection needs to be rectangular in order to name it."
Use the menu Sheet - Named Ranges and Expressions - Define 
Name: joined
Range or formula expression: $Sheet1.$A$2:$A$3~$Sheet1.$C$3:$C$4
Push button OK.
It works.

We expect that, automatically, by giving a name to a discontinuous range the Calc program will create the name and join the different ranges with the combine sign: ~