Jump to content

Extract zipcode from text field


This topic is 5729 days old. Please don't post here. Open a new topic instead.

Recommended Posts

What sort of calculation can i use to check if the last WORD (rightword, 1) of a text field, is made up of just numbers.

This is to be used to extract zipcodes from address lines.

Generally, the address line field runs as follows:

add1, add2, city, state zip

but on occasions, the zip and state are reversed, or the country has also been added to the end. I therefore need to be able to check if the last word (or indeed whatever selection of text i pull out) contains just numbers - if so I can therefore identify it as a zipcode and copy it off into another field.

Link to comment
Share on other sites

I've actually found a workaround now, by just checking if the first character of the words are numerical, but i would still be interested to know if there is way to check if a text range is numerical, or alphabetical.

No file as such, but example of some text fields below

411 East Palm Canyon Drive, Palm Springs, California 92264

Olive Avenue, Rehoboth Beach, Delaware 19971

125 Canyon Circle Drive, Sedona, Arizona 86351, USA

10529 Main Street, Clarence, New York 14031–1684

So, if i set up a field to extract the last word bu calculation, is there a way to check if that last word is made up entirely out of numericals (0123456789) or if it is alphabetical characters, bearing in mid that it may not have a fixed width (ie not always 5 characters)

Link to comment
Share on other sites

This topic is 5729 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.