INSERT A SPACE INTO A TEXT VALUE

JonRowland

Active Member
Joined
May 9, 2003
Messages
415
Office Version
  1. 365
Platform
  1. Windows
Hi,

Hope someone can help me.

I have a number of text values. However, I need to be able to add a space into these after the fifth character.

Any ideas how I can do this?

Thanks

Jon
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
i want ask related to above question

i have text example abc12ab
how to make it abc.12.ab
and like this too a8b6f4 how to make it like this a.8.b.6.f.4

TIA
 
Upvote 0
The second one, I would use a UDF:

Code:
Function adddots(r As String) As String
With CreateObject("vbscript.regexp")
    .Pattern = "(.)"
    .Global = True
    adddots = .Replace(r, "$1.")
    adddots = Left(adddots, Len(adddots) - 1)
End With
End Function

Excel Workbook
AB
1a8b6f4a.8.b.6.f.4
Sheet1
 
Upvote 0
The second one, I would use a UDF:

Code:
Function adddots(r As String) As String
With CreateObject("vbscript.regexp")
    .Pattern = "(.)"
    .Global = True
    adddots = .Replace(r, "$1.")
    adddots = Left(adddots, Len(adddots) - 1)
End With
End Function

Excel Workbook
AB
1a8b6f4a.8.b.6.f.4
Sheet1
 
Upvote 0
ur answer working, thanks alot mr. HOTPEPPER
sorry i want ask again (reverse with my question before)

abc.12.ab how to make it abc12ab
a.8.b.6.f.4 how to make it like this a8b6f4

thank in advance
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,208
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top