Re: Insert blank space
- From: Ed Peters <edpeters345@xxxxxxxxxxx>
- Date: Sat, 08 Sep 2007 06:29:51 -0700
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
.
- References:
- Insert blank space
- From: Ed Peters
- Re: Insert blank space
- From: Chip Pearson
- Insert blank space
- Prev by Date: Find arguments
- Next by Date: RE: grade book
- Previous by thread: Re: Insert blank space
- Next by thread: Re: Insert blank space
- Index(es):
Relevant Pages
|