August 6, 200817 yr I need extract certain characters from a text field. As an example I want just the second letter "e" from a text field containing the word "text". I believe I should use the position and left functions. I can't quite figure out how these work.
August 6, 200817 yr I agree. However, the word "text" only has 1 "e", that not withstanding, I would suggest the following combination: Middle ( SuppliedTextField ; Position ( SuppliedTextField ; "e" ; 1 ; 2 ) ; 1 ) Were the field not to contain a second "e" or your desired criteria, whatever that might be, what do you want returned as a result? HTH Tim
August 6, 200817 yr the word "text" only has 1 "e", that not withstanding, I would suggest the following combination: Middle ( SuppliedTextField ; Position ( SuppliedTextField ; "e" ; 1 ; 2 ) ; 1 ) If the supplied text contains only one occurence of the "e" character, the calculation will return the first character of the supplied text. If the supplied text does contain a second occurence of the "e" character, then it's a safe bet the result is going to be "e" - why calculate at all? I am under the impression the question is actually "what is the second letter of text" - which is answered by: Middle ( text ; 2 ; 1 )
August 6, 200817 yr I am under the impression the question is actually "what is the second letter of text"That would make sense, wouldn't it? I misread the op, sorry. Tim
August 7, 200817 yr Author The question was "what is the second character", and middle does it. I knew there had to be a simple way to extract what I needed. Thanks!
Create an account or sign in to comment