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 to combine multiple rows into single column, or multiple columns

How can I take multiple rows of different data for one user, and move them into columns so that each user has only one row.

In my example, I have three tables. The table in red is the current data I have. The tables in green are what I want to convert the data to.

I tried moving each value into its own column with a formula placing a formula in a different column and moving the data over like this: In C2, =IF B2=21, B2' then copying the data into one row and deleting the others. This is long and complicated process and I am wondering if there is a better way.

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

https://docs.google.com/spreadsheets/d/1utqqw1Am0C_x80t1BiswHmIdWzEhNDHq4vtdBOnkGMI/edit?usp=sharing

>Solution :

You may try:

1st table

=byrow(unique(tocol(A2:A,1)),lambda(z,{z,join(", ",filter(B:B,A:A=z))}))

2nd table

=byrow(unique(tocol(A2:A,1)),lambda(z,{z,torow(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