View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Address Format Problem

Try this small user defined function:

Function blank_in(r As Range) As String
blank_in = ""
s = r.Value
n = Len(s)
trip = False
For i = 1 To n
sbit = Mid(s, i, 1)
If IsNumeric(sbit) Then
blank_in = blank_in & sbit
Else
If trip = False Then
trip = True
blank_in = blank_in & " " & sbit
Else
blank_in = blank_in & sbit
End If
End If
Next
End Function


if A1 contains:
123main street
then
=blank_in(A1)
will return
123 main street

--
Gary''s Student - gsnu200718