Forum Discussion
Hogstad_Raadgivning
Aug 12, 2021Iron Contributor
Find 7# digits in a string
Hi, I have text string where I would like et select numbers only from. And i manage to do that. But it find all the numbers, is it possible to only select the numbers when it is 7 digits concaten...
PeterBartholomew1
Aug 12, 2021Silver Contributor
A somewhat roundabout formula!
= LET(
k, SEQUENCE(1+LEN(@comment)),
chr, --MID(@comment,k,1),
nonNum, FILTER(k,ISERROR(chr)),
freq, FREQUENCY(k,nonNum)-1,
strt, XMATCH(7,freq),
res, MID(@comment,strt,7),
IFERROR(res,"")
)
Guess one has to start somewhere.