Skip to Content
0

# Sort by street

Feb 16, 2017 at 05:35 PM

47

Former Member

HI I have a request to sort according to street name.

The problem is of course there is a number first which we want to exclude.

How would you do a formula to remove the number?
We have to assume the number comes first. ( some people have like

100 Main st. # 1 here we only want to exclude 100).

And then I need to group or sort on this formula.

* Please Login or Register to Answer, Follow or Comment.

### 2 Answers

Vitaly Izmaylov
Feb 16, 2017 at 08:34 PM
0

Just a sample formula:

stringvar x:="100 Main street";
numbervar a;

for a:=1 to Length(x) do
if isnumeric (left(x,1)) then x:=right(x,Length(x)-1) ;
trimleft (x)

Share
Brian Dong Feb 17, 2017 at 07:15 PM
0

Hi Paul,

Oh there are so many problems with trying to do it this way. The address will have to be in the same format for all the records. Hopefully the apartment number doesn't come before the street number.

Also, sorting by a string will have M and m sorted differently so spelling is also important unless you convert the address to Uppercase in your formula. Problems with abbreviations. I've worked on trying to group people together in the same household. Sorting by address is the worst because of the things I've mentioned.

Good luck,

Brian

Share