Bug Hunting Session
Bug 123001 - A little improvement to CONCATENATE/CONCAT, please?
Summary: A little improvement to CONCATENATE/CONCAT, please?
Status: RESOLVED DUPLICATE of bug 99517
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-Function
  Show dependency treegraph
 
Reported: 2019-01-27 20:12 UTC by TBeholder
Modified: 2019-06-27 17:45 UTC (History)
6 users (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 TBeholder 2019-01-27 20:12:24 UTC
Description:
Almost the same as CONCATENATE/CONCAT, only taking separator as a fixed argument, to be added after every non-empty string if any non-empty string is added after it.
CONCATENATESEP("Separator"; "Text1"; ...; "Text30")
CONCATSEP ("Separator"; {"Texts"})

Of course, while lumping text together without separators tend to make it unreadable, once separators are supported, it would make sense to add a counterpart of SUMIF/SUMIFS, but for strings.


Steps to Reproduce:
1. I want to make a readable digest of articular entries picked out of a table.


Actual Results:
There's no way to do it now, since even DGET throws an error if there's more than one result.

Expected Results:
$TooManyColumns.Y2 ... $TooManyColumns.Y199:
=$B199&"/"&$C199&$D199&" @"&$E199&CHAR(10)
$Summary.E33:
=CONCATSEPIFS(CHAR(10), $TooManyColumns.$Y$2:$Y$199, $TooManyColumns.$B$2:$B$199,"="&$A33, $TooManyColumns.$G$2:$G$199,"="&$D33)&T(STYLE("text_smaller"))


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Roman Kuznetsov 2019-01-30 13:11:06 UTC
Eike, please take a look at this
Comment 2 TBeholder 2019-02-02 04:45:44 UTC
Correction: concatenation-with-separator itself, of course, can be done, but even this requires a lot of conditionals and either an impenetrable construct using CURRENT() in dodgy ways, or use of many columns as an array of temporary variables just to easily check arguments.
While inside the cycle that does CONCAT() this would be trivial (a single "if X and Y then Z").
Comment 3 Eike Rathke 2019-02-05 14:49:11 UTC
I don't get what you want in "Expected Results", but your description sounds like you want to use the TEXTJOIN() function where you can specify a separator and whether empty cells/strings should be concatenated using the separator as well, for example =TEXTJOIN(CHAR(10),TRUE(),A1:A3)
Comment 4 TBeholder 2019-02-16 18:30:59 UTC
(In reply to Eike Rathke from comment #3)
> sounds like you want to use the TEXTJOIN() function where you can specify a
> separator and whether empty cells/strings should be concatenated
That does it, indeed. Thanks!
"TEXTJOIN" is not be found in help (Version: 6.1.2.1), however. Though there are tips for it in Function Wizard.

I guess the bug should be changed to "please add basic documentation for TEXTJOIN()" now.
Comment 5 Xisco Faulí 2019-06-27 16:50:31 UTC
(In reply to TBeholder from comment #4)
> (In reply to Eike Rathke from comment #3)
> > sounds like you want to use the TEXTJOIN() function where you can specify a
> > separator and whether empty cells/strings should be concatenated
> That does it, indeed. Thanks!
> "TEXTJOIN" is not be found in help (Version: 6.1.2.1), however. Though there
> are tips for it in Function Wizard.
> 
> I guess the bug should be changed to "please add basic documentation for
> TEXTJOIN()" now.

Changing it to Documentation then...
Comment 6 Olivier Hallot 2019-06-27 17:45:08 UTC

*** This bug has been marked as a duplicate of bug 99517 ***