DEV Community

Cover image for List the Positions of Each Character
Judith-Excel-Sharing
Judith-Excel-Sharing

Posted on

List the Positions of Each Character

Problem description & analysis:

Below is a row of letters. The letters in certain positions are continuous.

original table

We need to arrange them according to the format of “letter+positions”, as shown below:

desired table

Solution:

Use SPL XLL:

=spl("=[(d=E@1(?)).group@op(~).(d(~1) / ~.concat())]",A1:J1)
Enter fullscreen mode Exit fullscreen mode

As shown in the picture below:

result table with code entered

Explanation:

E@1 function converts a multilayer sequence to a single-layer one. group@op groups members without sorting members before and returns sequence numbers of members. ~1 represents the first sub-member of the current member.

Top comments (2)

Collapse
 
judith677 profile image
Judith-Excel-Sharing

Any ideas or thoughts on the problem or solution are welcome. We'd love to discuss more with you! OR feel free to join our communities to tackle more Excel difficulties!
✨Discord: discord.gg/hgbKEvJ4
✨Reddit: reddit.com/r/esProc_Desktop/

Collapse
 
judith677 profile image
Judith-Excel-Sharing

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

SPL download address: scudata.com/download-Desktop

Plugin Installation Method: c.scudata.com/article/1652061135502

References to other rich Excel operation cases: c.raqsoft.com/article/1651916536524

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