return a list of optionally delimited text values based on a criteria


Same question posted on the OpenOffice forum

Note; your images are difficult to read, being small.

Hi Robleyd,
A couple of things.

  1. I am unable to see the small images, they appear big to me. I would like to fix it so they are easier to read but I cannot see the issue. If you have an suggestions i would appreciate it.
  2. More important I gave a simple example of what I wanted and the group provided a good simple solution with TEXTJOIN. But my real need if for something more like SUMIFS where I use 4 conditions to determine if I want to add to my summ. I need to meet 4 conditions in order to add more items to my string. I dont think I can do that but i might be wrong. Any thoughts?
    Chrisboat

It seems AskLibreOffice rescales large images; nothing us users can do about that except download the image separately and view it.

In future, consider uploading a LibO file with the information; or as your screenshots are mainly text, perhaps paste the text as you did on the AOO forum - which appears to be the source of your first screenshot above!

Since you are using LibO Calc anyway seemingly, you have a standard function for the task. No VBA acrobatics needed nor the user function I offered in the other forum.

Please always cross-link if you post the same question in different forums.

===Edit1 2019-02-12 14:50 (UCT +1:00)===
BTW:
The TEXTIF function posted in the OQ would even work in recent LibO under the Option VBAsupport 1 setting. It would, however be seriously inefficient, and would not accept, of course, calculated arrays on the respective parameter positions.

Thank you for the feedback. I was unaware of the cross-link ability and am not able to find out how to do it.

More important I gave a simple example of what I wanted and the group provided a good simple solution with TEXTJOIN. But my real need is for something more like SUMIFS where I use 4 conditions to determine if I want to add to my summ. I need to meet 4 conditions in order to add more items to my string. I dont think I can do that with Textjoin but i might be wrong. Any thoughts?

Finally if I wanted to try TEXTIFS Where is the OPTION VBSupport 1 setting?

Chrisboat

solved the VBS Support 1 issue myself … put the command in the basic program … it worked

It worked…
Well, it worked in a specific situation with very short arrays, probably.
You will find out yourself that it’s too inefficient as soon as your arrays will have lengths of some hundred rows, and that there may arise situations where one or both of the arrays need precalculation, and the “TEXTIF” fails completely.
Better use the TEXTJOIN() solution.
(MS Excel users are encouraged to rely on user code even if completely unnecessary. Don’t go this way.)