In Excel, Combine Multiple Detail Data Columns into One Row in Each Group

Problem description & analysis:
The following Excel table has a grouping column and two detailed data columns.

We need to combine the two detail data columns in each group into one row and automatically generate column headers for the new columns…


This content originally appeared on DEV Community and was authored by Judith-Excel-Sharing

Problem description & analysis:
The following Excel table has a grouping column and two detailed data columns.

original table
We need to combine the two detail data columns in each group into one row and automatically generate column headers for the new columns.

desired result table
Solution:
Use SPL XLL to type in the following formula:

=spl("=d=E(?).group@o(Object).(Object|(~.conj([Name,Info]))), [$[Object]|(d.max(~.len())\2).conj([$[Name] / #,$[Info] / #])] | d",A1:C13)

As shown in the picture:

result table with code entered
Explanation:
E()function reads data from the Excel table. group@o groups rows without prior sorting. $[] represents a string, ~ is the current member, and # is ordinal number of the current member.


This content originally appeared on DEV Community and was authored by Judith-Excel-Sharing


Print Share Comment Cite Upload Translate Updates
APA

Judith-Excel-Sharing | Sciencx (2024-06-18T09:53:22+00:00) In Excel, Combine Multiple Detail Data Columns into One Row in Each Group. Retrieved from https://www.scien.cx/2024/06/18/in-excel-combine-multiple-detail-data-columns-into-one-row-in-each-group/

MLA
" » In Excel, Combine Multiple Detail Data Columns into One Row in Each Group." Judith-Excel-Sharing | Sciencx - Tuesday June 18, 2024, https://www.scien.cx/2024/06/18/in-excel-combine-multiple-detail-data-columns-into-one-row-in-each-group/
HARVARD
Judith-Excel-Sharing | Sciencx Tuesday June 18, 2024 » In Excel, Combine Multiple Detail Data Columns into One Row in Each Group., viewed ,<https://www.scien.cx/2024/06/18/in-excel-combine-multiple-detail-data-columns-into-one-row-in-each-group/>
VANCOUVER
Judith-Excel-Sharing | Sciencx - » In Excel, Combine Multiple Detail Data Columns into One Row in Each Group. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/06/18/in-excel-combine-multiple-detail-data-columns-into-one-row-in-each-group/
CHICAGO
" » In Excel, Combine Multiple Detail Data Columns into One Row in Each Group." Judith-Excel-Sharing | Sciencx - Accessed . https://www.scien.cx/2024/06/18/in-excel-combine-multiple-detail-data-columns-into-one-row-in-each-group/
IEEE
" » In Excel, Combine Multiple Detail Data Columns into One Row in Each Group." Judith-Excel-Sharing | Sciencx [Online]. Available: https://www.scien.cx/2024/06/18/in-excel-combine-multiple-detail-data-columns-into-one-row-in-each-group/. [Accessed: ]
rf:citation
» In Excel, Combine Multiple Detail Data Columns into One Row in Each Group | Judith-Excel-Sharing | Sciencx | https://www.scien.cx/2024/06/18/in-excel-combine-multiple-detail-data-columns-into-one-row-in-each-group/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.