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!

Formula to streamline addresses

Status
Not open for further replies.

Abner2

Technical User
Nov 14, 2002
12
US
I'm trying to streamline some addresses. There is really only one major issue I have. A business address is entered one of two ways:

123 Main St @ (Supermarket Name)

or

(Supermarket Name) @ 123 Main St.

This ruins my statistics if I want to see which address has the most activity because the same address is counted as two seperate addresses since they are entered two different ways. Is there a simple formula that will fix this error or would I have to make a formula for each individual address? Thanx
 
Hi,
The best approach would be to fix the data..
You could probably test for a number that starts the address and assume , then, that it is in form 1 -
By using various instr and substr functions, you could reformat it.( same technoque to ID form 2 types)

Lots of work.

[profile]

 
There are a few ways to go here as Turk points out, but consider rnning it through a list service to standardize the address and move the supermarket name into it's own field.

It's much easier to construct Raleys @ 123 Main than to deconstruct it.

Here's a quick formula you might try:

if isnumeric(mid({table.address},instr({table.address},"@")+1,1)) then
mid({table.address},instr({table.address},"@")+1)+" @ "+
left({table.address},instr({table.address},"@")-1) else
{table.address}

I don't have Crystal here but the theory is OK.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top