Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel, how to enter space between initials in name column 1

Status
Not open for further replies.

johnbarr44

Technical User
Feb 27, 2009
29
NZ
I have been asked to correct a spreadsheet listing thousands of surnames and initials in two columns, with further columns containing data for each person.

The 'initials' column contains either one, two or three upper case initials. The initials have no spaces between them, but these are required.
Is there an easy way to create a space between the initials?

Data as presented:
A
AB
ABC

Format required
A
A B
A B C

Thanks for any suggestions.
John B
 
I don't know an easy way of doing it through spreadsheet function, but the following user defined function should do the trick:

Code:
[blue]Public Function Spacer(strSource As String) As String
    Spacer = Trim$(Join$(Split(StrConv(strSource, vbUnicode), ChrW$(0)), " "))
End Function[/blue]
 
Many Thanks strongm. That did the trick and saved me a heap of work.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top