Forum Discussion
Excelwizz123
Jan 07, 2025Copper Contributor
Extracting Text
Hi, for the life of me I cannot work out a way to extract the text I need,
I have an address eg. "2 Birch Court" and I want to extract the text to the format of "002BC"
But these addresses change to :
15 Oak Park
19 Birch Avenue
Ect.
Anyone have any ideas?
2 Replies
- SergeiBaklanDiamond Contributor
As variant
=LET( split, TEXTSPLIT(A1," "), CONCAT( TEXT( TAKE(split,,1), "0000"), LEFT( DROP( split,, 1) ) ) ) - Harun24HRSilver Contributor
If you have access to REGEX functions then could try-
=TEXT(REGEXEXTRACT(A1,"[0-9]+"),"0000")®EXREPLACE(A1,"[^A-Z]","")