How to Add Spaces Between Characters, Letters, or Digits in Excel
AuthorSiluviaβ’Last modified
When working with imported codes, product IDs, serial numbers, or text strings in Excel, you may need to insert spaces to make the data easier to read. For example, you may want to change ABCDE to A B C D E, 123456 to 1 2 3 4 5 6, or SKU99 to S K U 9 9.
Excel does not provide a single built-in button for all these cases, but you can do it with formulas, VBA, or Kutools for Excel. This tutorial shows several practical ways to add spaces between letters, digits, or every character in Excel.

Method 1: Add spaces between characters with a formula
Method 2: Add spaces between letters, numbers, or characters with Kutools
- Case 1: Add spaces between letters
- Case 2: Add spaces between every character
- Case 3: Add spaces before numeric characters
- Case 4: Add another separator instead of a space
Method 1: Add spaces between characters with a formula
If you are using Microsoft 365 or Excel 2021 and later versions, you can use a formula to split the text into individual characters and join them back together with spaces.
Suppose the original text is in cell A2.
- In cell B2, enter the following formula, and press Enter.
- Drag the fill handle down to apply the formula to other cells.
=TEXTJOIN(" ",TRUE,MID(A2,SEQUENCE(LEN(A2)),1))
Result: The formula adds a space between each character in the selected text string.
How this formula works:
- LEN(A2) counts how many characters are in the cell.
- SEQUENCE(LEN(A2)) creates a list of character positions.
- MID(A2,SEQUENCE(LEN(A2)),1) extracts each character one by one.
- TEXTJOIN(" ",TRUE,...) joins the extracted characters with spaces.
π‘ Tip: This formula works best in Microsoft 365 and Excel 2021 or later. If you are using an older Excel version, consider using VBA or Kutools for Excel instead.
Limitations of formulas
- It requires Microsoft 365 or Excel 2021 and later for the formula used in this method.
- The result is formula-based, so you may need to copy and paste the results as values.
- It separates every character in the cell, including letters, numbers, and symbols.
- It does not provide flexible position options, such as adding spaces only before letters or before numeric characters.
Method 2: Add spaces between letters, numbers, or characters with Kutools
If you want to add spaces to many cells without writing formulas or VBA, you can use the Add Text feature of Kutools for Excel. Compared with a formula, this method gives you more flexible position options, so you can choose whether to add spaces before letters, between every character, or before numeric characters.
Case 1: Add spaces between letters
This case is useful when your cells contain letters, and you want to add a space before each letter, so text such as Excel becomes E x c e l.
Recommended option: Before uppercase/lowercase letters
- Select the cells where you want to add spaces.
- Click Kutools > Text > Add Text.
- In the Text box, press the Space key once.
- Select Only add to.
- From the drop-down list, choose Before uppercase/lowercase letters.
- Click OK.

Result: Spaces are added before letters, creating a separated-letter effect.
Case 2: Add spaces between every character
If your data contains both letters and numbers, and you want to separate every single character, use the Between characters option.
Recommended option: Between characters
- Select the cells that contain the text strings or mixed codes.
- Click Kutools > Text > Add Text.
- In the Text box, press the Space key once.
- Select Only add to.
- From the drop-down list, choose Between characters.
- Click OK.

Result: A space is inserted between every character, including letters and numbers.
Case 3: Add spaces before numeric characters
Recommended option: Before numeric characters
- Select the cells that contain text and numbers.
- Click Kutools > Text > Add Text.
- In the Text box, press the Space key once.
- Select Only add to.
- From the drop-down list, choose Before numeric characters.
- Click OK.

Result: A space is added before each numeric character.
Case 4: Add another separator instead of a space
Besides spaces, the Add Text feature can also insert other separators, such as hyphens, slashes, or commas. Instead of pressing the Space key in the Text box, type the separator you want to insert, and then choose the suitable option under Only add to, such as Before uppercase/lowercase letters, Between characters, or Before numeric characters.
Result: Kutools inserts the separator you entered based on the option you choose. For example, if you type a hyphen and choose Between characters, ABCDE becomes A-B-C-D-E. 
- Batch adds spaces to all selected cells in one go
- No formulas, VBA, or macro knowledge required
- Lets you add spaces before letters, between every character, or before numeric characters
- Works with normal text, number strings, mixed codes, product IDs, and serial numbers
- Can insert other separators, such as hyphens, slashes, or commas, instead of spaces
- More flexible than formulas when different text-position rules are needed
- Easy to use with a clear dialog box and preview-style settings
Method 3: Add spaces between characters with VBA
If you use an older Excel version or prefer a reusable custom function, you can use VBA to add spaces between characters.
- Press Alt + F11 to open the Microsoft Visual Basic for Applications window.
- Click Insert > Module.
- Paste the follwing VBA code into the module.
- Press Alt + Q to return to the worksheet.
- In a blank cell, enter the following formula:
- Press Enter and drag the formula down to apply it to other cells.
Function AddSpace(Str As String) As String
'Updated by Extendoffice 2026/5/19
Dim i As Long
For i = 1 To Len(Str)
AddSpace = AddSpace & Mid(Str, i, 1) & " "
Next i
AddSpace = Trim(AddSpace)
End Function
=AddSpace(A2) Result: The custom function adds a space between each character in the text string.
Limitations of VBA
- It requires working with macros and code.
- You may need to save the workbook as a macro-enabled file.
- Other users may need to enable macros before the custom function works.
- It may feel difficult for beginners who are not familiar with VBA.
- It is less convenient if you need to repeat this task often or apply different spacing rules.
Which method should you use?
Different methods are suitable for different Excel versions and data-cleaning needs. Use the comparison below to choose the best method for your situation.
| Method | Best For | Advantages | Limitations |
|---|---|---|---|
| Formula | Quick results in Microsoft 365 or Excel 2021+ | β No VBA required; dynamic and easy to edit | β Requires modern Excel functions; separates every character without flexible position options |
| Kutools for Excel | Batch adding spaces or separators with flexible position rules | β No formulas or VBA; supports options such as Before uppercase/lowercase letters, Between characters, and Before numeric characters | Requires Kutools for Excel, but provides a much easier and more flexible way to handle different spacing needs |
| VBA | Older Excel versions or reusable custom function | β Works as a custom worksheet function | β Requires macros; may be difficult for beginners |
Frequently asked questions
1. How do I add spaces between every character in Excel?
In Microsoft 365 or Excel 2021 and later versions, you can use this formula:
=TEXTJOIN(" ",TRUE,MID(A2,SEQUENCE(LEN(A2)),1))
For example, ABCDE becomes A B C D E.
2. How do I add spaces between every digit in Excel?
If the cell contains only digits, use the same formula:
=TEXTJOIN(" ",TRUE,MID(A2,SEQUENCE(LEN(A2)),1))
For example, 123456 becomes 1 2 3 4 5 6.
3. How do I add spaces between letters only?
With Kutools for Excel, use Add Text > Only add to > Before uppercase/lowercase letters. This is useful when you want to add spaces before alphabetic characters rather than before every number or symbol.
4. How do I add spaces between every character in mixed text and numbers?
With Kutools for Excel, use Add Text > Only add to > Between characters. This separates every character, including letters, numbers, and symbols. For example, A1B2C3 becomes A 1 B 2 C 3.
5. How do I add spaces before numbers in Excel?
With Kutools for Excel, use Add Text > Only add to > Before numeric characters. For example, Item123 becomes Item 1 2 3.
6. Why does Kutools add spaces before every digit instead of before the whole number?
Because Before numeric characters targets each numeric character individually. So SKU2026 becomes SKU 2 0 2 6, not SKU 2026.
7. Can I add hyphens or slashes instead of spaces?
Yes. In the formula, replace the space inside " " with another separator such as "-" or "/". In Kutools, type the separator you want into the Text box instead of pressing the Space key.
| Original | Separator | Result |
|---|---|---|
| ABCDE | - | A-B-C-D-E |
| 123456 | / | 1/2/3/4/5/6 |
8. Can I add spaces after every 3 or 4 characters?
Yes, but that is a different formatting task. For example, you may want to change 123456789012 to 1234 5678 9012. In that case, use a method designed to insert spaces after every fixed number of characters.
Related articles
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
All Kutools add-ins. One installer
Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.
- All-in-one suite β Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
- One installer, one license β set up in minutes (MSI-ready)
- Works better together β streamlined productivity across Office apps
- 30-day full-featured trial β no registration, no credit card
- Best value β save vs buying individual add-in
Table of Contents
- Method 1: Add spaces between characters with a formula
- Method 2: Add spaces between letters, numbers, or characters with Kutools
- Case 1: Add spaces between letters
- Case 2: Add spaces between every character
- Case 3: Add spaces before numeric characters
- Case 4: Add another separator instead of a space
- Method 3: Add spaces between characters with VBA
- Which method should you use?
- Frequently asked questions
- The Best Office Productivity Tools
Kutools for Excel
Brings 300+ advanced features to Excel
- π§© Overview
- π₯ Free Download
- π 30-Day Free Trial available


