Forum Discussion
J-Des000
Dec 23, 2024Brass Contributor
Repeating Numbers
Hi, Trying to repeat the same number (from an array) an X number of times. How do I go about this? I've seen some examples using the OFFSET function, but trying to do this by avoiding volatile fu...
Patrick2788
Dec 23, 2024Silver Contributor
Before regex, I had a recursive function for this task, but REGEXEXTRACT has made it obsolete!
This will handle numbers and texts:
=LET(
rep, SEQUENCE(, 3, 1, 0),
extract, REGEXEXTRACT(texts, ".+", rep),
TOCOL(extract)
)I may get cited by those who wish to simplify by removing LET but I tend to favor making the notation as obvious as I can to make it more readable.