Bug 101250 - Named Expressions do not allow multiple targets
Summary: Named Expressions do not allow multiple targets
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.1.4.2 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-01 15:09 UTC by Uwe Dippel
Modified: 2016-08-04 11:37 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Uwe Dippel 2016-08-01 15:09:06 UTC
This could be considered RFE, but it bugs me:
I use a number a spreadsheets with good success using named expressions. Recently, I needed a combined named expression, but that doesn't work. I can't mark two arrays, and if I enter them manually, separated by a semicolon, and click 'Add', it doesn't accept the input. This is not quite consistent with other potential inputs (e.g. SUM).

I haven't found a nice work-around yet. I use a range of labels that I read and transfer to another sheet into various locations (so I can't use a simple array) and defining those ranges per file has helped me pretty much until here.
Comment 1 m_a_riosv 2016-08-02 01:10:22 UTC
it's not possible use the semicolon in that way, because as such you are not doing a valid range. Semicolon it is used to separate parameters, function like SUM() accepts several ranges as parameters, but there is a limit of 30.

https://help.libreoffice.org/Calc/Operators_in_Calc#Reference_operators

To join ranges the character to use is the tilde ~

eg:
$Sheet1.$A$1:$A$6~$Sheet1.$C$1:$C$6

You need to verify that it works properly with your formulas, it works fine with SUM($Sheet1.$A$1:$A$6~$Sheet1.$C$1:$C$6)
but eg not with
SUMPRODUCT($Sheet1.$A$1:$A$6~$Sheet1.$C$1:$C$6).

Resolved as not a bug, please if you are not agree reopen it.
Comment 2 Uwe Dippel 2016-08-04 10:30:26 UTC
You are right w.r.t. concatenation of an expression using the tilde.

I need it in a larger spreadsheet, where I use the formula 
=IF(ISBLANK(ID.A2),"",INDEX(SRows,QUOTIENT(ID.A2-1,COLUMNS(Seats))*DRows+1)&" "&INDEX(Seats,MOD(ID.A2-1,COLUMNS(Seats))+1))

(Whatever this formula does) if I set the field 'Seats' to 
$'LA Mensa'.$D$6:$E$6
my sheet works; with 
$'LA Mensa'.$D$6~$'LA Mensa'.$E$6
my sheet does not work (Errors 504)

In any case, my understanding is that both expressions ought to parse to exactly the same array 'Seats' (see formula above) for calculation.

Therefore I reopen it cautiously. 
Should my understanding be wrong, please inform me likewise.
Comment 3 m_a_riosv 2016-08-04 11:37:23 UTC
As in comment #1, is needed to verify that used functions admit joined ranges.

INDEX() admit joined ranges, explicitly described in their help: https://help.libreoffice.org/Calc/Spreadsheet_Functions#INDEX
but COLUMNS() seems not, it is not mentioned in their help:
https://help.libreoffice.org/Calc/Spreadsheet_Functions#COLUMNS
and gives an error, even entering addresses of the joined ranges in the function instead a named range.

So except you are sure that COLUMNS() it's designed to accept joined range, there is not a bug.

If you are not agree, reopen it.
But please first ask on the forum, also to know what the formula does,
please look for help in the forum, https://ask.libreoffice.org/en/questions/