REMOVEREPEATS removes chosen repeated characters from an array
Excel Formula:
=LAMBDA(array,repeatChar,
LET(a,array,rpt,repeatChar,
ttaA,TEXTTOARRAY(a),
isMatch,--(ttaA=rpt),
cA,COLUMNS(ttaA),
rArr,RESIZEARRAY(RIGHTARRAY(isMatch,cA-1,0),,cA,0),
isRepeat,1-(isMatch*rArr=1),
rptCols,COLUMNNUMBERS(isRepeat)*isRepeat,
srtRows,SORTROWS(rptCols,1),
idx,IF(srtRows=0,"",INDEX(ttaA,ROWNUMBERS(srtRows),srtRows)),
return,TEXTJOINARRAY(idx,,),
return)
)
Lambda - Last Cell and Split.xlsx | |||
---|---|---|---|
B | |||
1 | Original Array | ||
2 | test--this--removal--of---repeats | ||
3 | this--test--is---the-greatest---test--you'll--ever--see | ||
4 | further--test--to---prove-----that--I'm--serious | ||
5 | |||
6 | |||
7 | Text join | ||
8 | test-this-removal-of-repeats | ||
9 | this-test-is-the-greatest-test-you'll-ever-see | ||
10 | further-test-to-prove-that-I'm-serious | ||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B8:B10 | B8 | =REMOVEREPEATS(B2:B4,"-") |
Dynamic array formulas. |
Upvote
0