sbglobal2012
New Member
Im using the fallowing macro that works with just the street name and suffix in A1
[pre]
[/pre]
[pre]
Code:
Option Compare Text
Public Sub MoveSuffix()
SuffixString = "ST,Street,PL,Place,Blvd,Boulavard,AVE,Avenue,CT,Court,DR,Drive,LN,Lane"
For Each StreetAddress In Columns("A:A").SpecialCells(xlCellTypeConstants, 2)
LastSpacePos = 1
Do
LastSpacePos = InStr(LastSpacePos + 1, StreetAddress, " ")
Loop Until InStr(LastSpacePos + 1, StreetAddress, " ") = 0
Suffix = Right(StreetAddress, Len(StreetAddress) - LastSpacePos)
If InStr(1, SuffixString, Suffix) > 0 Then
StreetAddress.Offset(0, 1).Value = Suffix
StreetAddress.Value = Left(StreetAddress, LastSpacePos - 1)
End If
Next StreetAddress
End Sub