Replace Occurrences of a Substring With a Sequence of Characters
- If the setup is always so convenient, you could use:
=LET(d,A1,s,C1,dl,"a",
TEXTJOIN(MID(s,SEQUENCE(,LEN(s)),1),0,TEXTSPLIT(d,dl,,,1)))
... which is short for (less readable than):
=LET(d,A1,s,C1,dl,"a",
se,MID(s,SEQUENCE(,LEN(s)),1),
sp,TEXTSPLIT(d,dl,,,1),
TEXTJOIN(se,0,sp))
- If you want to replace each substring ("a") with an integer sequence, see the shortest formula in JvdV's answer.