Re: Insert blank space



On 8 Sep, 10:56, "Chip Pearson" <c...@xxxxxxxxxxxx> wrote:
Try something like the following:

Sub AAA()
Dim Rng As Range
Dim S As String
Set Rng = Range("A3")
S = Rng.Text
If Len(S) >= 4 Then
If Mid(S, 3, 1) <> " " Then
S = Left(S, 2) & " " & Mid(S, 3)
End If
Rng.Value = S
End If
End Sub

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consultingwww.cpearson.com
(email on the web site)

"Ed Peters" <edpeters...@xxxxxxxxxxx> wrote in message

news:1189243800.897042.173970@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx



Hi,

I have a variable length data in a cell.

I need to be able to insert a blank space after the 3rd character from
the right if one does not already exist.

How would I go about doing this?

Thanks,

Ed- Hide quoted text -

- Show quoted text -


Thanks guys!

Ed

.



Relevant Pages