@Can.U
Thanks for your explaination.
Based on my research, maybe you need the code to solve your problems efficiently.
Currently, I can use formula to expand a string with a range. If there are multiple ranges, I think you need to split it first.
I use 7 Lambda formulas to get the string that you need. I personally find it more complicated to use formulas.
- Part1,
=LAMBDA(x,LOOKUP(9^9,1*RIGHT(MID(x, FIND("-",x)-4,4),ROW($1:$4))))
- Part2,
=LAMBDA(y,LOOKUP(9^9,1*LEFT(MID(y, FIND("-",y),4),ROW($1:$4))))
- Part3,
=LAMBDA(a,MID(a,FIND((Part1(a)),a)-1,1))
- Part4,
=LAMBDA(x,Part3(x)&TEXTJOIN(","&Part3(x),,ROW(INDIRECT(SUBSTITUTE(MID(x,FIND(Part1(x),x)-1,1)&Part1(x)&Part2(x),"-",":"&Part3(x))))))
- Part5,
=LAMBDA(z,LEFT(z,FIND(Part3(z)&Part1(z),z)-1))
- Part6,
=LAMBDA(x,RIGHT(x,(LEN(x)-FIND(Part2(x),x)-LEN(Part2(x))+1)))
- Part7,
=LAMBDA(x,y,z,(x&y&z))
To better help you, I suggest you add "office-vba-dev", check whether you could get the solution of VBA code.
Thanks for your understanding.
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.