Formula to Join Cells that have Content (with Line Break)
Looking to see if there is a formula that would allow me to join cells into separate lines ONLY for cells that have content. Essentially I want to remove blanks somehow so it is just seamless data.
In my example, when I use CHAR(10). It joins the cells, but leaves blank lines if nothing was filled in for a cell.
Im currently using =JOIN(A4:A61, CHAR(10))
Thanks in advance!!
Best Answer
-
Hi @Cabooga,
Use a JOIN COLLECT instead:
=JOIN(COLLECT(A4:A61, A4:A61, <>""), CHAR(10))
This should eliminate the blank spaces
Sample (using slightly less rows!):
Hope this helps, but if you've any problems/questions then let us know!
Answers
-
Hi @Cabooga,
Use a JOIN COLLECT instead:
=JOIN(COLLECT(A4:A61, A4:A61, <>""), CHAR(10))
This should eliminate the blank spaces
Sample (using slightly less rows!):
Hope this helps, but if you've any problems/questions then let us know!
-
Oh my word, you are magic! That worked perfectly. Thank you! 🎉
-
Hi @Cabooga,
I think if you add COLLECT to your formula, it should work:
=JOIN(COLLECT(A4:A61, A4:A61, ISTEXT(@cell)))
If my response was helpful in any way (or answered your question) please be sure to upvote it, mark it as awesome, or mark it as the accepted answer!
Help Article Resources
Categories
Check out the Formula Handbook template!