#30 - Align Rows of Data To A Specified Column

#30 - Align Rows of Data To A Specified Column

Problem description & analysis:

Table A-C has multiple rows of data, where certain rows are empty; and column C has duplicate values. Values of column E are unique; they correspond to certain values of column C, but there are inconsistent letter cases among the corresponding values.

ABCDE
1PipeIDLengthMaterialConfiguration_List
2Ko1plastPlast
3Hund2concretePVC
4PP
5Gris3plast
6Lam4PVC
7Fisk5PP

We need to align table A-C to column E and ignore case difference.

GHI
1PipeIDLengthMaterial
2Ko1plast
3Gris3plast
4Lam4PVC
5Fisk5PP

Solution:

Use SPL XLL to do this:

=spl("=?1.align@a(E@1(?2).(upper(~)),upper(~3)).conj()",A2:C7,E2:E4)

As shown in the picture below:

r/esProc_Desktop - Align Rows of Data To A Specified Column

Explanation:

align@a function aligns a sequence to another sequence and performs grouping. conj() function concatenates members of all groups. E@1 converts a multilayer sequence to a single-layer one.

Please free to download SPL XLL and explore the data processing journey on your own⬇️

SPL download address: esProc Desktop Download

Plugin Installation Method: SPL XLL Installation and Configuration

References to other rich Excel operation cases: Desktop and Excel Data Processing Cases

SPL Programming (YouTube FREE courses): https://www.youtube.com/playlist?list=PLQeR-IhHo7qNCw6o7PW8YfHvRx8pgzZso