3 Replies Latest reply on Nov 11, 2013 11:51 AM by beverly

# Parsing Section-Township-Range

I am working with a client to clean up records containing the legal descriptions of about 750 land parcels in 12 states. An example of the data I am starting with is "8-14N-17E", which describes three types of information about that land parcel: Section 8, Township 14N, and Range 17E. All three items contain either one or two digit numbers, plus the township and range always contain a single letter for the direction.

What I am tryiing to do is parse this data in a way that breaks it into five fields: Section, Township Number, Township Direction, Range Number, Range Direction. I am just getting started with understanding how to do this as easily as possible. I have thought of replacing the hypens with a space so that I can use the Left, Middle & Right functions, and then extract the directions after doing this.

I don't want to overcomplicate this. Any ideas? Thanks!

• ###### 1. Re: Parsing Section-Township-Range

step one: replace the "-" with return "char(13)" so that you can use the Value functions.

Otherwise, it seems like you know what to do!

Beverly

• ###### 2. Re: Parsing Section-Township-Range

Beverly,

Thanks for your very quick reply! And also thanks for thinking I know what I am doing! I'm not a complete newbie, but there is SO much I have to learn. I am not sure what you mean about using the Value function in this situation. And how do I make sure the char(13) is placed; just by putting that term in the calculation formula?

Thanks again!

• ###### 3. Re: Parsing Section-Township-Range

you were going to "replace" the "-" with space, so I assumed that you knew about the Substitute() function. This can be used for the char(13), too:

Substitute ( myText ; "-" ; Char(13) )

Also, when you get the values, see if it's including the return or not. I'd think you would not want this in your new fields. If your calc gives you an invisible return, you can remove with the Substitute again:

Substitute ( newfield ; Char(13) ; "" )

HTH,

Beverly