-
Whoever set up the data like that has little knowledge about databases. Poor structure lends itself to headaches later. Address and Names are 2 Fields where these problems occur often.
This kind of approach is the only method that I know to fix 95% of the problem.
[VBA]Sub t()
Dim s As String, a() As String, b() As String, ac As Integer
s = "2400, 300 Smith St. SW, Sulphur, La, 70663"
a() = Split(s, ",")
b() = a()
ac = UBound(a)
ReDim Preserve b(0 To ac - 3)
s = Join(b, ", ") & vbCrLf & a(ac - 2) & ", " & a(ac - 1) & vbCrLf & a(ac)
MsgBox s
End Sub[/VBA]
Obviously, you need to replace s with the value of your address in that cell. Replace the MsgBox with the line where you set the value with your range object.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules