Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How concatenate cells under a condition across columns using ARRAYFORMULA?

I’ve found similar questions, but none with this type of condition. I need to join all cells that are dependent of another cell, separating it by comma. So, If A2:A has repeated values, concatenate all the correspondennt B2:B, the dependent cells from the A2:A.

Given the sheet:

Column A Column B
Jhon One
Jhon Two
Marcos Zero
Monica Two

I need to output:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Column C Column D
Jhon One, Two
Marcos Zero
Monica Two

The cells aren’t predicted values, so I can’t declare "One", or "Two" as a condition in neither C or D collumns.

I tried to modificate this formula: =ARRAYFORMULA(JOIN(", ",FILTER(B3:P3,NOT(B3:P3="")))) as =ARRAYFORMULA((SE(A2:A=A2:A,B2:B & B2:B)), but it outputs an error.

>Solution :

You may try:

=byrow(unique(A1:A4),lambda(z,{z,join(", ",filter(B:B,A:A=z))}))

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading