formula needed to insert space between every text character in a cell

usamampk

New Member
Joined
May 6, 2023
Messages
2
Office Version
  1. 2013
Platform
  1. Windows
i have data in a cell, what i want is a formula that can insert a space between every text character, like

Data in cell= abcdefghijklmnopqrs

Required format = a b c d e f g h i j k l m n o p q r s

the image file is attached

Please help
 

Attachments

  • 1.JPG
    1.JPG
    42.5 KB · Views: 8

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
In think using 2013, you'll have to use a UDF like this:

Code:
Function AddSpace(Str As String) As String
    Dim i As Long
    For i = 1 To Len(Str)
        AddSpace = AddSpace & Mid(Str, i, 1) & " "
    Next i
    AddSpace = Trim(AddSpace)
End Function

For example: =AddSpace(A1)
 
Upvote 0
Rick Rothstein has a clever alternative.
Code:
Function InsertSpaces(S As String) As String
  InsertSpaces = Trim(Replace(StrConv(S, vbUnicode), Chr(0), " "))
End Function
 
Upvote 0

Forum statistics

Threads
1,215,220
Messages
6,123,695
Members
449,117
Latest member
Aaagu

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