Skip to main content
Question

Validate and fix US Zip code (5) if needed

  • October 4, 2018
  • 0 replies
  • 53 views

I have a zip code field that may have more than or less than 5  characters.....I would like to create a text formula field that would Validate and fix my [Zip code (5)] field.

If the zip code is related to a [State] that has a leading zero at the beginning --- then I would like to add a leading zero if missing.....

Any advice or help is greatly appreciated


This topic has been closed for replies.

You can make a text formula field like this

Right("0000" & totext([my numeric zip code field]),5)

that will change a numeric field like

1234
  to be 01234

But I do not know what logic would be used to make a zip code shorter.  can you give an example of the data you are dealing with and if the field is text or numeric?