Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Split address number from address name

Status
Not open for further replies.

rbescos

Technical User
Jan 3, 2011
14
US
I need to separate the street number from the street name in to two different fields on a report. Any assistance would be greatly appreciated.
 
If your data always looks like this:

123 Main St.

Then the number formula would be:

left({AddressField},instr({AddressField}," ") - 1)

And the street formula would be:

mid({AddressField},instr({AddressField}," ") + 1)

The Instr function returns the numeric position of the first instance of a character or characters within a string, which in your case would be the space between the number and street.

However, I suspect that once you get this working you'll encounter some addresses that don't cooperate, so this will only be the first step.

 
Perfect.. This is just what I needed.. Works great!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top