Collect the content of non empty cells

Hi there,

I’m trying to collect alll the non empty cells from a range of cells and build a string out of it.

Assume a range C3:C23 with only some cells with data. example C4, C10, C15. I have no control on the number of non-empty cells. it could be 0 up to the total cells. I have also no control on the size of the range.

I need to build this kind of instruction :
Concatenate("(",C4,",",“C10,”,",“C15,”)")

Is that possible at all ?

Thanks in advance.

It’s rarely a good idea to create lists from entities in Calc. If you later want to analyze/modify the result you will experience lots of problems, and a SPLIT() function corresponding with the below mentioned TEXTJOIN() is still missing.

Thanks for the advise.

You may close the thread, of course, but you also may consider to mark the correct answer as accepted by clicking on the checkmark at the left. I judge the secvond way more helpful.
Expecting your conscious decision I will reopen the thread now.

As of V5.2.2 the TEXTJOIN() function was implemented for the purpose. You may use =TEXTJOIN(";";1;C3:C23) e.g.

Thanks Lupp have to Upgrade then (still running 5.0.3.2)

It does the work Lupp. Thanks a lot !
I’ll find a way to close the question.

By the way: Please prefer the tool ‘add a comment’ over posting an answer if your intended post not actually is an answer.