June 21, 201114 yr Newbies HI, I've tried to sort this without success, and probably because I'm not clever enough, I wish to extract the number, which may be a one to three digit number, from a field like Albert Street - Segment 2 33 The only thing that is guaranteed is that it is the number directly after the word Segment. In the above I only want the 2. I am sure that there is a simple answer and that I will kick myself later. Thanks for any help Matthew
June 21, 201114 yr I am sure that there is a simple answer I am not. Will there always be a space between "Segment" and the number? And will there always be a space following the number?
June 21, 201114 yr Author Newbies I am not. Will there always be a space between "Segment" and the number? And will there always be a space following the number? Yes. The number will always be separate.
June 21, 201114 yr Try = Let ( [ pos = Position ( text ; "Segment " ; 1 ; 1 ) ; w = WordCount ( Left ( text ; pos - 1 ) ) ] ; Case ( pos ; MiddleWords ( text ; w + 2 ; 1 ) ) )
Create an account or sign in to comment