J
Jack Deuce
We have many people entering addresses into the main database and by
the time we get them the addresses are not in any standard format,
i.e, Street, St, St., RR 1, Rt. 1, Rt 1, etc. I'm creating a macro
that will examine known problems and change to the new standard but
have come across a problem when the search string ends with characters
that need to be changed. Here's an example,
501 East Station St as entered should convert to
501 E. Station St. East to E. & Street to St.
The problem is when checking for St and replaceing with St. will also
change Station to St.ation
Selection.Replace What:=" St", Replacement:=" St.", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _
ReplaceFormat:=False
This will only happen when the text is at the end of the string as I'm
checking for leading and following spaces on the other scans.
Hope this makes sense and someone can provide a work around.
thx
the time we get them the addresses are not in any standard format,
i.e, Street, St, St., RR 1, Rt. 1, Rt 1, etc. I'm creating a macro
that will examine known problems and change to the new standard but
have come across a problem when the search string ends with characters
that need to be changed. Here's an example,
501 East Station St as entered should convert to
501 E. Station St. East to E. & Street to St.
The problem is when checking for St and replaceing with St. will also
change Station to St.ation
Selection.Replace What:=" St", Replacement:=" St.", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _
ReplaceFormat:=False
This will only happen when the text is at the end of the string as I'm
checking for leading and following spaces on the other scans.
Hope this makes sense and someone can provide a work around.
thx